mysub2(mysub1());
mysub1() will return undef. The problem is, when you pass undef directly to mysub2(...), @_ becomes an array of length 1, with the first (and only) element begin undef. Instead, try this:defined mysub1() ? "Exists" : "Array is not defined";
In reply to Re: sub returning undef
by orderthruchaos
in thread sub returning undef
by Scarborough
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |