in reply to Returning data from wrapped sub
isn't the same asreturn wantarry ? @a : $a[0];
Try doingmy @a; if(wantarray) { @a = &$ref; } else { $a[0] = &$ref; } ... do something ... return @a;
That should work. The issue is how return works with wantarray.return (wantarray ? @a : $a[0]);
------
We are the carpenters and bricklayers of the Information Age.
Vote paco for President!
|
|---|