If you're just changing one set of characters into another set of characters rather than utilizing the full power of the regular expression engine, you might just want to use the transliteration operator tr///
# turn all of the "a" characters into "r"s and all of the "b"s into "s +"s, etc. $string =~ tr/abcd/rstu/;
See perlop for more info on tr///
In reply to Re: regexp and a perl function
by duff
in thread regexp and a perl function
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |