Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: string substitutionby fletcher_the_dog (Friar) |
on Oct 08, 2003 at 17:02 UTC ( [id://297658]=note: print w/replies, xml ) | Need Help?? |
I may be wrong, but it sounds like you only want to replace BAD with HELL when BAD is a whole word.(e.g. you don't want "BADGER" to become "HELLGER"). If that is the case you might want to look at "\b" in "perldoc perlre"
In Section
Seekers of Perl Wisdom
|
|