You've already got a couple of answers explaining the /e option to s///, but I wonder if that's really the best approach. Perhaps you should look at using tr/// instead of s///.
$a = 'a b c d'; $a =~ tr/abcd/rstu/; print $a;
"The first rule of Perl club is you do not talk about
Perl club."
-- Chip Salzenberg
In reply to Re: regexp and a perl function
by davorg
in thread regexp and a perl function
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |