Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^3: Avoiding repeated undefs

by Eily (Monsignor)
on Feb 26, 2019 at 14:57 UTC ( [id://1230570]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my ($key, @array[0,1], undef, $value) = split " ", $string;
    
  2. or download this
    my ($key, @array[0,1], undef, $value) = split " ", $string, 6; # Split
    + five times, ignore the sixth value
    
  3. or download this
    my ($key, $value) = (split(" ", $string, -1))[0,6];
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (2)
As of 2024-04-26 05:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found