$str2="あaかbさcたdなe";
$str1="あかさたな";

$str2 =~ s/[^$str1]//g;
print $str2; # あかさたな