in reply to Propagating calling context
sub middle_function { if (wantarray) { my @result = inner_function(); # modify @result as needed @result; } else { my $result = inner_function(); # modify $result as needed $result; } }
-- Randal L. Schwartz, Perl hacker
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE (tilly) 2: Propagating calling context
by tilly (Archbishop) on Aug 22, 2000 at 05:43 UTC | |
by merlyn (Sage) on Aug 22, 2000 at 15:43 UTC |