Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: sorting ip octets

by Animator (Hermit)
on Feb 16, 2005 at 20:14 UTC ( #431729=note: print w/replies, xml ) Need Help??


in reply to sorting ip octets

A rather late reply, posted only to demonstrate TIMTOWTDI.

{ my $x; @ips = map { $_->[0] } sort { $x=0; $x = $a->[$_] - $b->[$_] and last for (1 .. 4); $x; } map { [ $_, split /[.]/ ] } @ips; }

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2022-08-19 08:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?