|
NAMESort::Key::IPv4 - sort IP v4 addressesSYNOPSISuse Sort::Key::IPv4 qw(ipv4sort); my @data = qw(1.1.1.1 1.1.1.0 1.1.1.2 2.1.0.3); my @sorted = ipv4sort @data; use Sort::Key::IPv4 qw(ipv4keysort); my @sorted = ipv4keysort { $_->ip_address } @hosts; DESCRIPTIONThis module extends the Sort::Key family of modules to support sorting of IP v4 addresses and networks.IPv4 addresses have to match the regular expression "/^\d+\.\d+\.\d+\.\d+$/". For instance 192.168.20.102. IPv4 networks have to match the regular expression "/^\d+\.\d+\.\d+\.\d+\/\d+$/". For instance "10.2.4.0/24". FUNCTIONSThe functions that can be imported from this module are:
SEE ALSOSort::Key, Sort::Key::MakerBUGS AND SUPPORTReport bugs by email or using the CPAN RT system at <http://rt.cpan.org/>.This module is hosted at GitHub: <http://github.com/salva/p5-Sort-Key-IPv4>. COPYRIGHT AND LICENSECopyright © 2007, 2009, 2012 by Salvador Fandiño, <sfandino@yahoo.com>.This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.
Visit the GSP FreeBSD Man Page Interface. |