[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [FWP] president




Rick Delaney wrote:
> 
> Keith Calvert Ivey wrote:
> >
> >   perl -MLWP::Simple
> >   > -le"y.,..dfor@a=get('http://cnn.com')=~/([\d,]{9})/g;print$a[0]-$a[1]"
>                                           ^        ^
> What are those doing there?  ;-)

Ack!  What am I pointing at?  

    s/   >/\n>/;

or

    s/\^/    ^/;

The point being that parentheses are unnecessary to capture the
substrings matched by the entire pattern with m//g in list context.

-- 
Rick Delaney
rick.delaney@home.com

==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe