And it would magically determine whether to call an arbitrary function between list and scalar contexts how . . . ?
As has been pointed out, it's a binary operator (albeit a two-character-wide one) just like + so the operands are put in scalar context just like every other binary operator. If you want it to work as if called on an array(ref), explicitly provide it with one by wrapping with []. Otherwise you're creating an exception for this one op and breaking orthagonality.
Update: Someone mentioned that there's other two-character-wide binary ops, and you know actually most of them are two chars. /me needs more caffeine . . .
The cake is a lie.
The cake is a lie.
The cake is a lie.
In reply to Re^2: 5.10 smart match behaviour
by Fletch
in thread 5.10 smart match behaviour
by zgrim
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |