Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
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 the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2014-09-02 02:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (18 votes), past polls