spivey49 has asked for the wisdom of the Perl Monks concerning the following question:
Before I recreate any wheels...does anyone have an example that will modify in place all html files in a directory?
I need to parse all html files in a directory, looking for a tag in the format:
<div align="center" class="noclass">nothing</div>
Once I've found this tag I would like to read a text value from a file in the same directory and replace "nothing" with this new value. No backup files needed, just an inplace edit will work.
I thought the HTML:Maniuplator module might be the easiest way to accomplish this, but haven't had a chance to test it yet.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Editing HTML files
by Tanktalus (Canon) on Jul 08, 2008 at 21:15 UTC | |
by spivey49 (Monk) on Jul 08, 2008 at 21:33 UTC | |
by pc88mxer (Vicar) on Jul 08, 2008 at 21:49 UTC | |
by Lawliet (Curate) on Jul 08, 2008 at 21:56 UTC | |
|
Re: Editing HTML files
by pc88mxer (Vicar) on Jul 08, 2008 at 21:06 UTC | |
by GertMT (Hermit) on Jul 08, 2008 at 21:09 UTC | |
|
Re: Editing HTML files
by wfsp (Abbot) on Jul 09, 2008 at 06:21 UTC | |
by spivey49 (Monk) on Jul 10, 2008 at 21:41 UTC | |
by spivey49 (Monk) on Jul 14, 2008 at 16:32 UTC | |
by wfsp (Abbot) on Jul 15, 2008 at 07:47 UTC | |
by spivey49 (Monk) on Jul 15, 2008 at 14:10 UTC |