laziness, impatience, and hubris PerlMonks

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

by jms53 (Monk)
 on Jan 30, 2012 at 16:38 UTC ( #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

Create A New User
Node Status?
node history
Node Type: note [id://950801]
help
Chatterbox?
 [Eily]: since the value of a node is also the sum from the two nodes above, you just have to demonstrate that the equality is true at the top of the triangle [Discipulus]: yes Eily, thanks oiskuu but i dont get it.. ;=( maybe I'll ask a SOPW [LanX]: all combinations with same amount of left and right? [Eily]: if you want to store in a structure with the coordinates as key, arrays might do, since the keys are going to be 0..n [LanX]: (Pascale path) [Discipulus]: yes Eily++ (very keen) I want to integrate my project with a 17th experiments. I want to colorize in sequence all paths [oiskuu]: Yeah, modifry the recursive func combinations() to return not the number, but the paths themselves. [Eily]: Discipulus I'd do that by starting from the bottom node I think. That way it can inherit the paths from the two nodes above (and so on, recursively) [LanX]: oh I meant fixed amount

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (10)
As of 2018-03-19 11:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
Voting Booth?
When I think of a mole I think of:

Results (239 votes). Check out past polls.

Notices?