Hi, I have to search and replace 'foo' to 'bar' in all the files in a directory(has subdirectories). The files are about 40k in size.
On the command line I would do it as, find ./mydir/ -type f -print | xargs perl -pi -e 's/foo/bar/' No backup of the original files required.I am brave. What is the most efficient way to implement this inside a perl program ? There are about 30 files to be processed. I went through perldoc perlrun and saw the code. I thought it as a criminal waste of time to try and modify that code for my purpose, when I can ask you folks :-) TIA, Chetak PS: I see this term 'foo' 'bar' in many programming books, what is the etymology of this? Confidentiality Notice The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>