if ( $addr =~ /\./ ) { print "IPv4" } else { print "IPv6" }
I know it's not exactly standards based, but there aren't any dots in IPv6 addresses. Yes, of course, the hostname could have dots, but that's not an IP address either.
In reply to Re: program to differentitate IPV4 and IPV6 address
by Anonymous Monk
in thread program to differentitate IPV4 and IPV6 address
by snimmaka
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |