Hi
Probably it is very obvious, but at this moment I cannot solve it. could you
please help me?
(1).
$ perl -e '$a="123234"; $a=~tr/23/ab/; print "$a\n"'
1abab4
Well, it is clear.
(2).
$ perl -e '$a="123234"; $b="ab"; $a=~tr/23/$b/; print "$a\n"'
1$b$b4
I understand this too - no interpolation.
but:
(3).
$ perl -e '$a="123234"; $b="ab"; eval "$a=~tr/23/$b/"; print "$a\n"'
123234
Shouldn't I get same as (1)? So how to do this?
TIA
Mariusz