in reply to sorting ip octets
Pack it!
sort { unpack('N',pack('C4',split(/\./,$a))) <=> unpack('N',pack('C4',split(/\./,$b))) } @list
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: sorting ip octets
by eclark (Scribe) on Feb 16, 2005 at 21:34 UTC | |
by Animator (Hermit) on Feb 17, 2005 at 10:15 UTC |
In Section
Seekers of Perl Wisdom