Perl Monk, Perl Meditation | |
PerlMonks |
Re^2: Efficient way to replace a set of values with another set of valuesby ColonelPanic (Friar) |
on Nov 23, 2012 at 10:19 UTC ( [id://1005244]=note: print w/replies, xml ) | Need Help?? |
Nice solution. In this case, all cases are at the beginning of the line. It might be a good idea to add an anchor in order reduce the likelihood of false positive matches:
(The m switch had to added so that ^ would match on each line). When's the last time you used duct tape on a duct? --Larry Wall
In Section
Seekers of Perl Wisdom
|
|