use Regexp::IPv6 qw($IPv6_re); $address =~ /^$IPv6_re$/ and print "IPv6 address\n";
To match full strings use "/^$IPv6_re$/".
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.0 or, at your option, any later version of Perl 5 you may have available.
Additionally, you are allowed to use the regexp generated by the module in any way you want, without any restriction. For instance, you are allowed to copy it verbating in your program.