This should be easy, but I'm haven't stumbled upon the answer yet.
I can successfully use the tr/// operator if both search list and replacement list are hardcoded. ie.
But the following does not produce the same result:my $s =~ tr/abcd/ABCD/;
Any clarification you can provide would be greatly appreciated. Thanks.my $replace = 'ABCD'; my $s =~ tr/abcd/$replace/;
In reply to configurable tr///? by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |