Re: OO confusion

2009-01-09 Thread Mike McClain
On Fri, Jan 09, 2009 at 05:52:45PM -0500, Chas. Owens wrote: > You seem to be under the impression that the argument to > Digest::MD5::md5_hex is a file name. The argument is a scalar holding > the data to perform md5 on. So Digest::MD5::md5_hex("foo") will give > you the MD5 of the data "foo".

Re: OO confusion

2009-01-09 Thread Chas. Owens
On Fri, Jan 9, 2009 at 16:40, Mike McClain wrote: snip >I appreciate your taking the time to respond and having been > reading your responses for several months now have no doubt that > you know what you're talking about. >I'm still not clear however about what's going on. >As you can

Re: OO confusion

2009-01-09 Thread Mike McClain
On Thu, Jan 08, 2009 at 07:12:03PM -0500, Chas. Owens wrote: > On Thu, Jan 8, 2009 at 17:47, root wrote: > >The following script gives me confusing results. > > I've not delved into OOP before and am surprised when something > > appears to work but gives wrong answers. > >Explicitly Digest

Re: OO confusion

2009-01-09 Thread Mike McClain
On Thu, Jan 08, 2009 at 06:47:05PM -0800, John W. Krahn wrote: > root wrote: > >The following script gives me confusing results. > >I've not delved into OOP before and am surprised when something > >appears to work but gives wrong answers. > > > >foreach( @ARGV) > >{ $target = $_; > > M

Re: Regular Expression - exclude character from character class ?

2009-01-09 Thread Chas. Owens
On Thu, Jan 8, 2009 at 23:25, howa wrote: > Hello, > > > Consider the string: > > $s = '[[2003]] abc [[2008]] "def"'; > > > I want to extract 2008 and def, so using > > > \[\[([\w\W^\]]+?)\]\]\s"(.+?)" > > The regex match all string, even thought I have added to exclude: ^\] > inside the character

Re: LWP getting special (multibyte) characters from webpages

2009-01-09 Thread John Refior
> $response->content gives you the exact byte values returned by > the server; decoded_content turns it into Perl's internal Unicode > representation (assuming the server is telling the truth about what > encoding the page is in). Thanks for the clarification, as I wasn't sure of the difference be

Re: quick regex question

2009-01-09 Thread Gunnar Hjalmarsson
Chris Knipe wrote: (Really just need to get $interface name and $signal)... Then you may prefer a list slice. my ($interface, $signal) = (split ' ', $Line)[1,5]; -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org

Re: quick regex question

2009-01-09 Thread Gunnar Hjalmarsson
Chris Knipe wrote: Paolo Gianrossi wrote: Could maybe a simple split(/\s+/ $Line, 7); work? Almost, but we're not *quite* there yet... ... I'm not sure why I am required to have 9 fields in the split to get the values now... It appears from your initial post as if there is a leading space b

Re: quick regex question

2009-01-09 Thread Paolo Gianrossi
Chris Knipe ha scritto: >>> # INTERFACE >>> RADIO-NAME MAC-ADDRESS AP SIGNAL-STRENGTH TX-RATE UPTIME >>> 0 interface_name radio >>> 00:0C:42:1F:2C:8D yes -63...@18mbps 9Mbps 2h2m38s >>> >>> I'm looking for a >>> foreach my $Line (@

Re: quick regex question

2009-01-09 Thread John W. Krahn
Chris Knipe wrote: Hi, Hello, I have two lines (well, 1 line is headers, then there follows a range of data)... # INTERFACE RADIO-NAME MAC-ADDRESS AP SIGNAL-STRENGTH TX-RATE UPTIME 0 interface_name radio 00:0C:42:1F:2C:8D yes -

RE: quick regex question

2009-01-09 Thread Chris Knipe
> > > > # INTERFACE > > RADIO-NAME MAC-ADDRESS AP SIGNAL-STRENGTH TX-RATE UPTIME > > 0 interface_name radio > > 00:0C:42:1F:2C:8D yes -63...@18mbps 9Mbps 2h2m38s > > > > I'm looking for a > > foreach my $Line (@Output) { > > my (

Re: quick regex question

2009-01-09 Thread Paolo Gianrossi
Chris Knipe ha scritto: > Hi, > > I have two lines (well, 1 line is headers, then there follows a range of > data)... > > # INTERFACE > RADIO-NAME MAC-ADDRESS AP SIGNAL-STRENGTH TX-RATE UPTIME > 0 interface_name radio > 00:0C:42:1F:2C

quick regex question

2009-01-09 Thread Chris Knipe
Hi, I have two lines (well, 1 line is headers, then there follows a range of data)... # INTERFACE RADIO-NAME MAC-ADDRESS AP SIGNAL-STRENGTH TX-RATE UPTIME 0 interface_name radio 00:0C:42:1F:2C:8D yes -63...@18mbps 9Mbps 2h2m38s

Re: Regular Expression - exclude character from character class ?

2009-01-09 Thread Mr. Shawn H. Corey
On Thu, 2009-01-08 at 20:25 -0800, howa wrote: > Hello, > > > Consider the string: > > $s = '[[2003]] abc [[2008]] "def"'; > > > I want to extract 2008 and def, so using > > > \[\[([\w\W^\]]+?)\]\]\s"(.+?)" > > The regex match all string, even thought I have added to exclude: ^\] > inside t

Re: grep and substring then uc

2009-01-09 Thread Mr. Shawn H. Corey
On Thu, 2009-01-08 at 18:23 -0800, Erik Witkop wrote: > Here is what I am trying to do, > > I want to grep on a semicolon, and then upper case the next character. > > So if my input data is in the format of > > Witkop; erik > > I want to find the semicolon and then uppercase the 'e' in erik. >

Regular Expression - exclude character from character class ?

2009-01-09 Thread howa
Hello, Consider the string: $s = '[[2003]] abc [[2008]] "def"'; I want to extract 2008 and def, so using \[\[([\w\W^\]]+?)\]\]\s"(.+?)" The regex match all string, even thought I have added to exclude: ^\] inside the character class. Any idea? Thanks. -- To unsubscribe, e-mail: beginne

grep and substring then uc

2009-01-09 Thread Erik Witkop
Here is what I am trying to do, I want to grep on a semicolon, and then upper case the next character. So if my input data is in the format of Witkop; erik I want to find the semicolon and then uppercase the 'e' in erik. Any help? -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org Fo