Your challenge doesn't make sense from a Perl perspective. You are abusing the terminology.
The types of values a subroutine returns is not decided by the subroutine, but by the caller. Therefore, your challenge is meaningless. And it can never return "an array" or "a hash". It'll be a scalar or a list, depending on the context in which it's called.
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
In reply to •Re: Auto-detecting returned or passed variable type
by merlyn
in thread Auto-detecting returned or passed variable type
by richard5mith
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |