Cookbook recipe 7.10, as quoted by JJ, has the virtue that it does not use a temporary file. If you will allow perl to make use of temporary files behind the scenes (which is normally perfectly ok), Cookbook recipe 7.9 is a whole heck of a lot simpler. As a command line one liner: perl -pie 's/a/p/g' try.txt foo.txt will go thru files try.txt and foo.txt and rewrite them with every occurence of 'a' replaced with 'p'. Try it -- you'll like it!
- substitution problem prachi shroff
- Re: substitution problem J. J. Horner
- Re: substitution problem Me
- Re: substitution problem Jeff Pinyan
- Re: substitution problem Me
- Re: substitution problem Brett W. McCoy
- Re: substitution problem prachi shroff
- Substitution Problem Mark Martin
- Re: Substitution Problem Carl Rogers
- RE: Substitution Problem Dave Newton
- RE: Substitution Problem Wagner-David
- Re: Substitution Problem M.W. Koskamp
- substitution problem Steve Massey