Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

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

by bart (Canon)
on Sep 17, 2003 at 10:15 UTC ( #292089=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $num_matches_stuff = $str =~ m/(stuff)/g;
    @all_the_matches   = $str =~ m/(stuff)/g;
    
  2. or download this
    $str = "stuff stuff stuff";
    $num_matches_stuff = $str =~ m/(stuff)/g;
    print $num_matches_stuff;
    
  3. or download this
    $str = "stuff stuff stuff";
    while($str =~ m/(stuff)/g) {
        print "Got one!\n";
    }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (7)
As of 2014-11-29 02:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (203 votes), past polls