On 12/30/2003 11:30 AM, Andrew Gaffney wrote:
I have ~97 HTML documents that I need to strip the footer (about 15 lines) from and replace with a different block of text. The footer is formatted differently in some of the HTML files, but they all start with the line:

<table border="0" width="100%" height="5%">

How can I replace everything after that particular line with a custom block of text? Thanks.


a small hint:


$ cat testdata
one
two
three
four
five
six
seven
eight
nine
ten

$ perl -nle 'print unless /six/..eof' test
one
two
three
four
five

I.e. Write everything out to your new copy except the old footer: 'unless /pattern/ .. eof'

then write out your new footer.

Regards,
Randy.


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to