Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
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 wandering the Monastery: (9)
As of 2015-07-04 10:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (59 votes), past polls