I'm thinking that the easiest way to achieve that is to simply slurp the whole file, and process it with a single s///. Source files are usually short enough to not pose any problems. According to perlrun you can use the -0777 switch to slurp the whole file (that's a zero, not a capital O, BTW. I always make that mistake.)
In reply to Re^2: Modifying File Contents
by bart
in thread Modifying File Contents
by ramthen
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |