in reply to Sorting Question

you are sorting keys - which are strings - numerically?

wait got it, you are comparing the values which are always 1.

for my $k (@vals) { $hsh->{$k} = 1; }

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

Replies are listed 'Best First'.
Re^2: Sorting Question
by boerni (Novice) on Nov 13, 2018 at 17:49 UTC
    Doh! Thanks Rolf!!!!