So, it seems like there is a lot of checks to wantarray here. An alternative would be to have a giant if (wantarray) dividing the sub into two implementations.
Or you could create a subroutine for each case and then create a wrapper subroutine to determine which one to call.
In reply to Re: Preserving Calling Context
by Argel
in thread Preserving Calling Context
by TedYoung
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |