Ned Konz wrote:

>     while (<>) {
>         if (2..2) { s/yyyy/wwww/ }
>         print
>     } continue {
>         close ARGV  if eof;     # Not eof()!
>     }

I assume you know about the -i switch to perl, too.

If not, look at perlrun.

If you put the above into a script and did:

        perl -i.bak myscript.pl file1 file2 file3

then the substitution would be done, and the files would
be backed up as .bak files.

If you don't give an extension to the -i switch, no backup
file is made.

-- 
Ned Konz
currently: Stanwood, WA
email:     [EMAIL PROTECTED]
homepage:  http://www.bike-nomad.com

---
You are currently subscribed to perl-win32-users as: [archive@jab.org]
To unsubscribe, forward this message to
         [EMAIL PROTECTED]
For non-automated Mailing List support, send email to  
         [EMAIL PROTECTED]

Reply via email to