Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Sorting Hash / Array

by salva (Abbot)
on May 21, 2012 at 14:32 UTC ( #971624=note: print w/replies, xml ) Need Help??


in reply to Sorting Hash / Array

I have just uploaded to CPAN a new version of Sort::Key::IPv4 that can sort network addresses in the format xxx.xxx.xxx.xxx/xxx:
use Sort::Key::IPv4 qw(netipv4keysort); my %hash = ( '127' => { 'network' => '10.182.48.0/24', 'VLAN' => '3509' }, ...); my @sorted_keys = netipv4keysort { $hash{$_}{network} } keys %hash;

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://971624]
help
Chatterbox?
[Discipulus]: the very same topic was discussed in CB yesterday at lunch time
[Discipulus]: or can I ask for a module to do the back conversion from flame to txt?

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2017-06-23 08:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (538 votes). Check out past polls.