$other = "x!4Y"; $password = $PATTERN; # $PATTERN is aHINTbcd $password =~ tr/abcd/$other/;