Just another Perl shrine | |
PerlMonks |
Re: sub returning undefby Happy-the-monk (Canon) |
on May 24, 2004 at 14:38 UTC ( [id://355927]=note: print w/replies, xml ) | Need Help?? |
my @array = @_; There's your array, even if $array[0] yields undef, @array still is a defined array with one single element. Test for $_[0] being undef, before you create another array.
In Section
Seekers of Perl Wisdom
|
|