..It is also unique in that all other Perl operators impose a context (usually string or numeric context) on their operands, autoconverting those operands to those imposed contexts. In contrast, smartmatch infers contexts from the actual types of its operands and uses that type information to select a suitable comparison mechanism...
with use warnings in your script turn on, it would shout"Useless use of a constant (x),(y) in void context". Which shows you are inferring a void context using smartmatch like so.print( "x" ~~ ("x", "y", "z") );
In reply to Re: ~~ and list literal
by 2teez
in thread ~~ and list literal
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |