use Net::IPv6Addr; sub valid_ipv6 { return Net::IPv6Addr::ipv6_parse($_[0]); }