in reply to Re^4: wantarray - surprise behaviour
in thread wantarray - surprise behaviour
sub foo { $c = wantarray; print $c ? "A" : defined $c ? "S" : "V" } (foo(), foo(), foo()); print "\n"; $v = (foo(), foo(), foo()); print "\n"; @v = (foo(), foo(), foo()); print "\n"; __END__ VVV VVS AAA
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: wantarray - surprise behaviour
by diotalevi (Canon) on Sep 01, 2004 at 17:43 UTC |