Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Sorting Question

by LanX (Saint)
on Nov 13, 2018 at 17:44 UTC ( [id://1225735]=note: print w/replies, xml ) Need Help??


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!!!!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (7)
As of 2024-04-18 22:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found