http://www.perlmonks.org?node_id=75584


in reply to Variables in Regular Expressions?

Why are you using tr at all? This is likely best done with s///

$c =~ s!$a!$b!;

Cheers,
KM