use Data::Validate::IP qw(is_ipv4); my $ip_w_mask = '10.3.2.0/28'; my ($ip, $mask) = m{^(.*)/(\d+)$} or die("Incorrect format: Mask not found\n"); is_ipv4($ip) or die("Incorrect format: Malformed IP address\n");
In reply to Re^2: Script to input IP Address and Subnet Bits (10.3.2.0/28)
by ikegami
in thread Script to input IP Address and Subnet Bits (10.3.2.0/28)
by jesuashok
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |