in reply to sorting by field of a tab-delimited hash value

Something like that:
sub GPA_sort { ( split /\t/, $students{ $a } )[ -1 ] <=> ( split /\t/, $students{ $b } )[ -1 ] }

Replies are listed 'Best First'.
Re^2: sorting by field of a tab-delimited hash value
by keiusui (Monk) on Jun 18, 2006 at 22:21 UTC
    This looks great. But for some reason when I use this, the values of the hash are added to the hash as keys with no values. Any idea why??

    PS: I would really like to know why this is happening.