App::Manoc::Utils::IPAddress - collection of functions to handle IP addresses
version 2.99.2
Return true if $addr is a valid IPv4 address string.
$addr
Return true if $addr looks like a partial IPv4 address string.
NOT IMPLEMENTED YET
Convert a string to an unsigned long (32-bit) in network order.
Convert an unsigned long (32-bit) in network order to a dotted notation ipaddres
Convert a networkk prefix length to a netmask represented as an integer.
Convert a networkk prefix length to a netmask represented as a string.
Convert a network prefix length to a network wildcard
Convert a network netmask (as an ipv4 address string) to prefix length.
netmask2prefix("255.255.255.0"); # return 24
Return undef if input is not a valid netmask.
Return a zero padded representation of an IPv4 address string.
padded_ipaddr("10.1.1.0"); # return "010.001.001.000"
Useful when storing ip addresses as strings in databases.
Remove zero padding from an IPv4 address string.
Gabriele Mambrini <gmambro@cpan.org>
Enrico Liguori
This software is copyright (c) 2017 by Gabriele Mambrini.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install App::Manoc, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::Manoc
CPAN shell
perl -MCPAN -e shell install App::Manoc
For more information on module installation, please visit the detailed CPAN module installation guide.