Beefy Boxes and Bandwidth Generously Provided by pair Networks chromatic writing perl on a camel
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^4: Sorting ip addresses quickly

by Anonymous Monk
on Nov 24, 2010 at 15:40 UTC ( #873476=note: print w/ replies, xml ) Need Help??


in reply to Re^3: Sorting ip addresses quickly
in thread Sorting ip addresses quickly

To make it work you'd need to use something like

print map { $$_[0] } sort { $$a[1] <=> $$b[1] } map { [ $_, join '', map { sprintf '%03d', $_ } /(\d+)/g ] } <DATA>; __DATA__ 192.168.6.10 10.10.254.253 10.10.254.3
update: oh look, thats what the root post is about, lol


Comment on Re^4: Sorting ip addresses quickly
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2013-05-25 00:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best material for plates (tableware) is:









    Results (516 votes), past polls