Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: multiple (different) substitutions on same $fooby matsmats (Monk) |
on Aug 22, 2003 at 14:48 UTC ( [id://285796]=note: print w/replies, xml ) | Need Help?? |
Here's an alternative way to do it, doing the whole search and replace as a oneliner:
I've added a \b for you, see comment further up This assumes you meant to have a /g-switch after every substitution. I couldn't find a way to match only the first "man" and "woman", but I'm sure it will keep me awake tonight.
In Section
Seekers of Perl Wisdom
|
|