Periodically, I dip into perl6, but haven't now in quite some time. However, I do vaguely recall being bit by this, and I believe I got the answer on IRC.
I can't find any clear documentation that states that <> doesn't interpolate, other than a very vague portion of the Class Hash doc:
The general Subscript rules apply providing shortcuts for lists of lit +eral strings, with and without interpolation. my %h = oranges => 'round', bananas => 'bendy'; dd %h<oranges bananas>; # OUTPUT: «("round", "bendy")␤» my $fruit = 'bananas'; dd %h«oranges "$fruit"»; # OUTPUT: «("round", "bendy")␤»
So it appears as though one needs to use <<>> for interpolation if you're using <> notation.
There's no mention explicitly that <> does not interpolate, unless I'm searching incorrectly.
In reply to Re: Small Perl 6 discoveries IV, hash access
by stevieb
in thread [Perl6] Perl 6 discoveries IV, hash access
by holli
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |