Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^2: Script to input IP Address and Subnet Bits (10.3.2.0/28)

by ikegami (Patriarch)
on Dec 03, 2005 at 17:33 UTC ( #513830=note: print w/replies, xml ) Need Help??


in reply to Re: Script to input IP Address and Subnet Bits (10.3.2.0/28)
in thread Script to input IP Address and Subnet Bits (10.3.2.0/28)

It doesn't check for range, so you can do:
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");

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (6)
As of 2023-02-02 11:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I prefer not to run the latest version of Perl because:







    Results (17 votes). Check out past polls.

    Notices?