in reply to Re: Re: Hash sorting
in thread Hash sorting

(1) the chomp was placed before the split so that the value being split didn't have a newline. With the chomp afterwards, you're removing in the newline from $_, not $value (which was populated before the chomp)
(2) in your orginal code the statement read "put the value of $key into hash at key '$key'", rather than as the updated code has it. "put the value of $value into the hash at key '$key'.

rdfield