chromatic is correct (of course). To add a few details, % is not "special" inside double quotes so "\%" is the same as "%"; the \ (unnecessarilly) escapes the %. And "%x" is the same as "%"."x", that is, it doesn't do anything with any hash called %x. This is in contrast to "$x" and "@x", both of which interpolate variables (though "@x" has some history behind it where it didn't interpolate unless @x existed at compile time and now generates an error for this case).
Note that while "$x" is the same as "".$x, "\$x" is not the same as "".\$x. [ This is in part because "".\$x isn't that useful (producing "SCALAR(0x1b1d9ec)"); in particular, given "".\$x, there is no good way to get to $x. ] "\$x" is the same as "\$"."x" which is the same as '$'."x" or just '$x', that is, a string containing a $ followed by an x. Likewise "\@x" is the same as '@x'.
- tye (but my friends call me "Tye")In reply to Re: Hash reference problem (hash ref stored in another hash)
by tye
in thread Hash reference problem (hash ref stored in another hash)
by dmtelf
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |