[vox-tech] More Perl script help
Richard Crawford
vox-tech@lists.lugod.org
Thu, 25 Mar 2004 12:09:32 -0800 (PST)
Matt Roper said:
> Do your files have the "<form" and the "reset>" on different lines? If
> so, I think you need to add the 's' modifier to your regexp. I.e.,
> change
>
>> $data =~ s|<form.*reset>|<!-- form action removed -->|g;
>
> to
>
> $data =~ s|<form.*reset>|<!-- form action removed -->|gs;
>
> The 's' modifier treats the entire string as a single line, which allows
> '.' to match newline characters.
Matt,
Thanks! The 's' modifer did it! I appreciate it.
As to the directory issue, I actually modified the script just a bit after
sending it to the list. That issue is fixed now as well.
--
Sláinte,
Richard S. Crawford (AIM: Buffalo2K)
http://www.mossroot.com http://www.stonegoose.com/catseyeview
"It is only with our heart that we can see clearly. What is essential is
invisible to the eye." --Antoine de Saint Exupery