Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: hash key confusion

by BrowserUk (Pope)
on Mar 24, 2014 at 20:46 UTC ( #1079595=note: print w/ replies, xml ) Need Help??


in reply to hash key confusion

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)};.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.


Comment on Re: hash key confusion
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1079595]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (7)
As of 2015-07-29 23:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (269 votes), past polls