Reverse complement DNA sequences in PERL

it includes IUPAC consensus characters:

sub reverse_complement () {
my $new = $_[0];
$new =~ tr/acgtrymkbdhvACGTRYMKBDHV/tgcayrkmvhdbTGCAYRKMVHDB/;
$new = reverse ($new);
return ($new); }