Why don't you just return nothing at all on error, and get over the non-problem problem?
There was really no point in writing code here in hindsight. So ...
Added code for the uninitiated ...
use Data::Dumper; my @p = give(); my $p = give(); print Dumper( \@p , $p ); sub give { # Case of error. return; }
In reply to Re^3: undef==defined sometimes? (body question)
by parv
in thread undef==defined sometimes?
by perl-diddler
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |