I would suggest you return a reference ie. return \%myhash OR return \@myarray ... in the "inner function" and use ref to determine what was returned, but if you can't mess with the code there is a problem.
You can't tell if a scalar an array or a hash was the intended return type without repeating the conditional flow.
In reply to Re: Grab return values of different type from a sub
by Utilitarian
in thread Grab return values of different type from a sub
by athanasia
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |