Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Odd workings of split

by JavaFan (Canon)
on Mar 29, 2012 at 12:58 UTC ( #962382=note: print w/replies, xml ) Need Help??


in reply to Odd workings of split

Another work around, specially geared towards the oddity that split returns an empty list:
$cmd[$_] = [split("\n", $cmd[$_]), ""]->[0];

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (8)
As of 2017-02-23 12:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (346 votes). Check out past polls.