Help for this page
push my @result, wantarray ? &inner_func() : scalar &inner_func();
sub outer_func { my @result; ... # do some other stuff return (wantarray ? (@result) : $result[0]); }