Perl Monk, Perl Meditation | |
PerlMonks |
Re: reg. expr. multiple substitutionsby dulwar (Monk) |
on May 17, 2012 at 16:53 UTC ( [id://971117]=note: print w/replies, xml ) | Need Help?? |
Use a hash:
It would be a good idea to simplify $pattern if there is some common pattern to the tags. By the way, you need to use the g modifier to replace all occurrences of each tag if it can occur more than once in the string, also if you are substituting each tag separately.
In Section
Seekers of Perl Wisdom
|
|