Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^2: Printing keys from a hash by value?

by jms53 (Monk)
on Jan 30, 2012 at 16:38 UTC ( [id://950801]=note: print w/replies, xml ) Need Help??


in reply to Re: Printing keys from a hash by value?
in thread Printing keys from a hash by value?

That is very interesting. I can surely use this to benchmark the different algorithms.

However, could you enlighten me on how the first part works? perldoc has nothing on chr... Thanks!

  • Comment on Re^2: Printing keys from a hash by value?

Replies are listed 'Best First'.
Re^3: Printing keys from a hash by value?
by aaron_baugher (Curate) on Jan 30, 2012 at 20:53 UTC

    chr gives the character corresponding to an ASCII value. 65 = 'A', 66 = 'B', and so on. In retrospect, I could have made my loop 65..90, but I think 1..26 makes it more obvious that I'm spanning the alphabet. Putting x4 after it just turns 'A' into 'AAAA' and so on, to make it more obvious that they're words.

    Aaron B.
    My Woefully Neglected Blog, where I occasionally mention Perl.

Re^3: Printing keys from a hash by value?
by Anonymous Monk on Jan 30, 2012 at 19:49 UTC

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2024-04-26 06:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found