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

Re^3: map split vs array split

by radiantmatrix (Parson)
on Jul 31, 2007 at 15:18 UTC ( #629851=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    foreach (@lines) {
       my @lines1 = split(' ', $_); # $_ is "it" -- the current element of
    + @lines
       print @lines1,"\n";
    }
    
  2. or download this
    map { print split(' ', $_),"\n" } @lines;
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://629851]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (9)
As of 2021-10-27 17:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (94 votes). Check out past polls.

    Notices?