Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^2: Why not using an array?

by pklausner (Scribe)
on Jan 10, 2012 at 13:22 UTC ( [id://947163]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub sort_by_intf # sort interface alpha/number name mixture properly
    { my $A = $a;    # just turn any number into a 0004 digit one
    ...
      $B =~ s/([0-9]+)/ sprintf "%04d",9999-$1 /ge;
      $B cmp $A; # reverse order happens to be useful here:
    }            # Tun0, Ser1, Port-channel2, Gi3, Fa4, Eth5
    
  2. or download this
    for (sort sort_by_intf keys %ifSpeed) {
      printf "intf: %s,  speed: %d\n" $_, $ifSpeed{$_};
    }
    

Log In?
Username:
Password:

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

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

    No recent polls found