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;
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