in reply to Re: deprecated split ??
in thread deprecated split ??
As a demo, runt this code:
Result:sub foo { printf "foo(%s) called in %s context\n", join(', ', @_), wantarray ? 'list' : defined wantarray ? 'scalar' : 'void'; } @dummy = map { foo('inside', $_); foo('last', $_) } qw(alpha beta gam +ma);
foo(inside, alpha) called in void context foo(last, alpha) called in list context foo(inside, beta) called in void context foo(last, beta) called in list context foo(inside, gamma) called in void context foo(last, gamma) called in list context
Context propagation from the caller to the internal statements only happens on the last statement (for each flow), or in explicit return calls.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: deprecated split ??
by diotalevi (Canon) on May 27, 2004 at 22:03 UTC | |
by bart (Canon) on May 28, 2004 at 09:24 UTC |