Unfortunately perl documentation does not cover the case of using list as the argument for smart match
The smart match operator's operands are evaluated in scalar context. They can't possibly return a list. Furthermore, perlop and perlfunc are very clear as to what each operator returns in scalar context. There are a couple of exceptions:
@array is special-cased to mean \@array
%hash is special-cased to mean \%hash
/pat/ is special-cased to mean qr/pat/
In reply to Re^3: bug? why does this ~~ smart match to an array slice fail?
by ikegami
in thread bug? why does this ~~ smart match to an array slice fail?
by flies
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |