Mostly. Perl only gives special treatment to single barewords (with optional white space) used as hash keys (inside $h{here} or before =>). @h{x,y,z} isn't using a single bareword so it doesn't get special treatment so it gets parsed as "x",tr,z and then goes looking for two more commas to finish off the tr.
Note that "x" is also a Perl keyword but can still be used as a bareword here since "x" is only a binary operator and there is no left-hand side in front of "x" so Perl won't treat it as the operator.
However, you can write a slice and give it a single key, @h{y}, and the special bareword rules apply there. It isn't the "slice" that breaks the rule, it is having something more than a single bareword (+whitespace).
-
tye
(but my friends call me "Tye")
|