Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

m//g in list context

by grain_of_sand (Initiate)
on Aug 08, 2002 at 21:24 UTC ( #188743=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
        #!/bin/perl -w
        $" = '-';
    ...
        $string = "a:b:c";
        @list = ($string =~ m/(\w):(\w)/g);
        print "list=@list\n";
    
  2. or download this
        list=a-b-c-d
        list=a-b
    
  3. or download this
        list=a-b-b-c
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (2)
As of 2019-07-17 03:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?