Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

m//g in list context

by grain_of_sand (Initiate)
on Aug 08, 2002 at 21:24 UTC ( [id://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
Domain Nodelet?
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?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2024-04-16 18:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found