Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Managing your IP space with Perl

by terryfunk (Sexton)
on Nov 18, 2004 at 06:06 UTC ( #408699=note: print w/ replies, xml ) Need Help??


in reply to Managing your IP space with Perl

Nice tutorial...however it would be nice to add a routine that would also sort the ip addresses.


Comment on Re: Managing your IP space with Perl
Re^2: Managing your IP space with Perl
by fokat (Deacon) on Nov 22, 2004 at 04:43 UTC
    Nice tutorial...however it would be nice to add a routine that would also sort the ip addresses.

    Well, actually NetAddr::IP objects behave nicely when sorted, so this...

    sort @list_of_netaddr_ip_objects;

    ...Will do as expected. The trick is that the comparison operators used by sort and others, are overloaded too. The overload was done because I needed to sort addresses :)

    Best regards

    -lem, but some call me fokat

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (8)
As of 2015-07-03 21:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (56 votes), past polls