Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^2: Managing your IP space with Perl

by fokat (Deacon)
on Nov 22, 2004 at 04:43 UTC ( #409483=note: print w/replies, xml ) Need Help??


in reply to Re: Managing your IP space with Perl
in thread Managing your IP space with Perl

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://409483]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2017-08-22 23:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Who is your favorite scientist and why?



























    Results (344 votes). Check out past polls.

    Notices?