$string =~ s/zero/0/ig; $string =~ s/one/1/ig; $string =~ s/two/2/ig; $string =~ s/three/3/ig;
This is cool if there are just a few, but not if a lot. Is there a more compact way to do this?
i.e. I need a "trans-word-ilation" operator, similar to the "transliteration" opeerator
Thanks - DaveIn reply to Combining multiple =~ s/ by hennesse
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |