in reply to sub returning undef

I think the answer to your question is in the many responses you've already received, but none of the answers are that clear to me... The problem seems to be your method of calling the second subroutine. First off, I'm assuming that you meant

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