Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Re: Perl Idioms Explained - @ary = $str =~ m/(stuff)/g

by tachyon (Chancellor)
on Sep 16, 2003 at 04:44 UTC ( #291721=note: print w/ replies, xml ) Need Help??


in reply to Re: Perl Idioms Explained - @ary = $str =~ m/(stuff)/g
in thread Perl Idioms Explained - @ary = $str =~ m/(stuff)/g

An interesting observation. The behaviour for (?:...) and naked match strings is however appropriate provided you have at least one capture (...) in the RE.

@ary = 'stuff stuff stuff' =~ m/(?:st)u(ff)/g; print "@ary"; __DATA__ ff ff ff

Depending on your viewpoint your observation represents a bug or a feature!

cheers

tachyon

s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print


Comment on Re: Re: Perl Idioms Explained - @ary = $str =~ m/(stuff)/g
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://291721]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (12)
As of 2014-12-22 19:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (126 votes), past polls