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 reply to Re: sub returning undef
by Happy-the-monk
in thread sub returning undef
by Scarborough
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |