Because "\x61" is the byte character:'a'; whereas 97, is taken as the string '97':
$h{"\x61"} = 'a';; $h{97} = 'b';; pp \%h;; { 97 => "b", a => "a" }
What you might want is print $hash{chr(97)};.
In reply to Re: hash key confusion
by BrowserUk
in thread hash key confusion
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |