On Thu, Jan 08, 2004 at 03:05:25PM -0800, Richard Crawford wrote:
> I'm writing a Perl script which will go through all of the files in a
> directory and delete all of the text between <FORM and RESET>.  In each
> file, there are about ten lines of text between the two strings.  This has
> been breaking my head for a couple of hours now.  Anyone got any
> suggestions?

if the <form> and <reset> are on their own lines:

perl -i -e 'while (<>){
$form++,print if /FORM/;
$reset++ if /RESET/;
print unless ($form && !$reset);
}'  *.html

otherwise:

have fun!
:)

_______________________________________________
vox-tech mailing list
[EMAIL PROTECTED]
http://lists.lugod.org/mailman/listinfo/vox-tech

Reply via email to