![]() |
|
P is for Practical | |
PerlMonks |
Re: sorting ip octetsby eclark (Scribe) |
on Feb 16, 2005 at 21:29 UTC ( #431762=note: print w/replies, xml ) | Need Help?? |
Pack it! sort { unpack('N',pack('C4',split(/\./,$a))) <=> unpack('N',pack('C4',split(/\./,$b))) } @list
In Section
Seekers of Perl Wisdom
|
|