Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Sort never returns data in right order

by hippo (Abbot)
on Sep 05, 2017 at 14:39 UTC ( #1198698=note: print w/replies, xml ) Need Help??


in reply to Sort never returns data in right order

@keys = sort {$interface_bytes{$a} <=> $interface_bytes{b}} keys %interface_bytes;

That line doesn't look right to me. Perhaps you needed $b instead of just b.

Replies are listed 'Best First'.
Re^2: Sort never returns data in right order
by jsmith118 (Novice) on Sep 05, 2017 at 14:53 UTC

    Thank you.. I looked at that for a day and never saw it.

      You should have gotten a warning ("Uninitialized used of ...") unless you happened to have a key named b. Always use use strict; use warnings qw( all );!!!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1198698]
help
Chatterbox?
and the questions are moot...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2017-12-14 23:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (414 votes). Check out past polls.

    Notices?