im not having much success when trying to define hash keys to be hexadecimal values. i can demonstrate the problem with this small code fragment...
$hash{"\x61"} = 'a'; print $hash{"\x61"} . "\n"; #prints 'a' print $hash{97} . "\n"; #null output
my naive question (not being a perlmonk) - should not the key value for $hash{"\x61"} be identical to $hash{97} - and therefore the outputs be the same? assuming, as i do that "\x61" equates to decimal 97. i do not understand why both print statements yield different outputs. i would have thought/expected that both print statements should have yielded 'a' as the output.
In reply to hash key confusion by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |