Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Understanding Split and Join

by jwkrahn (Monsignor)
on Dec 28, 2006 at 13:23 UTC ( #592036=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my @list = split /\s+/, $string;
    my @list = $string =~ /(\S+)/g;
    
  2. or download this
    my @list = split ' ', $string;
    my @list = $string =~ /\S+/g;
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://592036]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2016-12-03 17:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (56 votes). Check out past polls.