> Shorter alternative:
Well ...
the sub ctxt() is just using the well documented wantarray the rest is only cosmetics to provide readable output.
If I wanted to golf, I could also do:
>perl -E"sub f{say qw/s l v/[wantarray//'2']};+f;$a=+f;@a=+f" v s l
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
FootballPerl is like chess, only without the dice
In reply to Re^3: u+ fails to force scalar context to empty list assignment: +( () = ... )
by LanX
in thread u+ fails to force scalar context to empty list assignment: +( () = ... )
by rsFalse
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |