it makes no sense to have to wrap extraneous code around an expression just to "tell" perl to evaluate it in list contextAssignment to an empty list is an easy and sensible way to apply list context to a function. It's no more extraneous than a list keyword; it's just more idiomatic.
There's even a kind of symmetry: you can't assign a scalar to undef, so you have a scalar keyword; you can assign a list to (), so you don't need a list keyword.
In reply to Re^5: What's most efficient way to get list context? (honest)
by Roy Johnson
in thread What's most efficient way to get list context?
by tlm
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |