in reply to Re^3: doing tr/// on-the-fly?
in thread doing tr/// on-the-fly?
Because:
eval { $t =~ tr/$search/$replace/; };
is just normal perl code where there is no interpolation so '$' is replaced with '$' and 's' is replaced with 'r' and 'e' is replaced with 'e' and 'a' is replaced with 'p', etc. while using string eval interpolates the variables $search and $replace.
|
|---|