in reply to Empty list as a return value

Not only what tye said, but your code undef my @x certainly smacks of voodoo programming. Leave the undef off, and you get exactly the same result, in a much more idiomatic way.

-- Randal L. Schwartz, Perl hacker