And yet, it is so profligate.
Of course, since it is copying all the stuff around. What about
sub x3{ 1 .. 1e6 } print time; $r = [ x3() ]; print time;
this?
But of course that wasn't my point - I'm rather saying that it is a bad idea to hide the decision of how to deal with returns in a place far away. And no, I'm not going the "context is bad" route; but using context to obfuscate things should be used in obfuscation type of code, only...
In reply to Re^3: Use of wantarray Considered Harmful (bad use)
by shmem
in thread Use of wantarray Considered Harmful
by kyle
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |