Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re: Sort never returns data in right order

by hippo (Canon)
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?

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (2)
As of 2018-08-18 10:08 GMT
Find Nodes?
    Voting Booth?
    Asked to put a square peg in a round hole, I would:

    Results (185 votes). Check out past polls.