I wonder if a listify operator could help avoiding bugs when changing the return expression of a sub.
It might help (and indeed, I think Perl6 has the list operator — but don't quote me), but the context in which the .. and ... range/flip-flop operators act is usually pretty clear. scalar alone serves pretty well in this case and in general since it's very easy to induce list context, so easy that one almost gets the impression it's the default!
In reply to Re^3: Return Value of List-Producing Elements in Scalar Context
by AnomalousMonk
in thread Return Value of List-Producing Elements in Scalar Context
by pikus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |