Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Odd workings of split

by Jenda (Abbot)
on Mar 30, 2012 at 09:30 UTC ( #962551=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    for (@cmd) {
      $_ = [split "\n", $_]->[0];
    }
    
  2. or download this
    for (@cmd) {
      $_ = (split "\n", $_)[0];
    }
    
  3. or download this
    for (@cmd) {
      s/\n.*$//s;
    }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2016-06-30 05:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (389 votes). Check out past polls.