P is for Practical | |
PerlMonks |
Re^2: How to use a variable in tr///by Roy Johnson (Monsignor) |
on Apr 08, 2005 at 11:30 UTC ( [id://445987]=note: print w/replies, xml ) | Need Help?? |
There is no transliteration built into s///g. The OP's example was tr/abc/def/. s/// can't do that without some help (some kind of lookup structure, or embedding a tr command in the eval'd replacement, and in that case, why not just eval?).
Caution: Contents may have been coded under pressure.
In Section
Seekers of Perl Wisdom
|
|