summaryrefslogtreecommitdiff
path: root/scripts/check-ipv4-ipv6.pl
blob: 0816ebeeed8ee91a14acccf6cece68d686cad1b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#! /usr/bin/perl

# Trivial script to check for valid IPv4 or IPv6 address

use strict;
use NetAddr::IP; 

foreach my $addr (@ARGV) {
    die "$addr: not valid a valid IPv4 or IPv6 address\n"
	unless new NetAddr::IP $addr;
}