On Aug 9, 8:12 am, [EMAIL PROTECTED] wrote: > Hi, I am new to Perl. > > I am trying to replace a string within a bunch of html files. > > Ideally, I would like to have the file name pulled from a list in a > text file, open the file, search for the string that will be replaced > within the file, pull the replacement string from another file, then > replace the string, close the file and move on to the next one. > > Does anyone know of a good place to find an existing script I can > modify for my purposes? > > Thanks.
Thanks for all of the replies. To answer Paul's question, I think I wasn't very clear with what I am trying to do. There are a few thousand html files. Within each file I want to change the numbers in this string: author_id = "60000"; (The 60k will vary.) with numbers that will be file specific. I have a csv file with the html file names and the corresponding replacement numbers. example: html_file_1.html,66548 html_file_2.html,98754 html_file_3.html,24514 etc... I need the script to open the files listed in the CSV and replace the 5 digit number in the html file with the one in the CSV. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/