I have an array for which the following test returns true:
1 ~~ @a
@a ~~ 1
In addition to the other answers, the list of Perl 5.10.1 changes has a section on changes made to the
The smart match operator
~~is no longer commutative. The behaviour of a smart match now depends primarily on the type of its right hand argument.
So Learning Perl may have been correct prior to these changes.