Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

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

by shenme (Priest)
on Sep 15, 2003 at 21:00 UTC ( #291661=note: print w/ replies, xml ) Need Help??

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

Is there an "... Explained" that covers the extension of this to:

$howmanytimes = @ary = $str =~ m/(stuff)/g; # or perhaps better as $howmanytimes = () = $str =~ m/stuff/g;
which then goes to show you don't need the capturing parentheses in the match and .... I'll shut up.

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

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (16)
As of 2015-07-30 13:29 GMT
Find Nodes?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...

    Results (271 votes), past polls