Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: Split function

by ColonelPanic (Friar)
on Dec 03, 2012 at 13:42 UTC ( #1006880=note: print w/ replies, xml ) Need Help??


in reply to Re: Split function
in thread Split function

If you are going to do error checking, why not do it properly? Check that all fields are present:

(my ($s, $a, $c, $r) = split /[,\t]/) < 4 and die;
or:
die if not defined $r;

(Also, you had a typo in your code: extra paren)



When's the last time you used duct tape on a duct? --Larry Wall


Comment on Re^2: Split function
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (14)
As of 2015-07-06 14:19 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 (75 votes), past polls