>s/([a-c])/($key = $1) =~ tr#a-z#A-Z#, $keythinks{$key}/ieg; これは s/([a-c])/ $keythinks{uc $1} /ieg; だとだめなの?