A list (which is what your constant sub returns) isn't an array.
Update: Perhaps this will help. Remember what a LIST in scalar context evaluates as.
perl5.10.0 -E'BEGIN{ sub X () { say "wantarray: ", defined wantarray ? + (wantarray eq "" ? "empty" : wantarray) : "undef"; qw(a b c) } } say + "ok" if "a" ~~ X'
The cake is a lie.
The cake is a lie.
The cake is a lie.
In reply to Re: 5.10 smart match behaviour
by Fletch
in thread 5.10 smart match behaviour
by zgrim
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |