Brian Volk wrote:
> 
>>From: John W. Krahn [mailto:[EMAIL PROTECTED]
>>
>># store the files to "edit" in @ARGV
>>@ARGV = map { chomp; "$dir/$_" } <BAD>;
>>
>># set the in-place edit variable
>># cannot be '' on Windows
>>$^I = '.bak';
>>
>># modify the files and save the originals with .bak extention
>>while ( <> ) {
>>    s & http://.* & descriptions/product/MSDS/$file &;
>>    print;
>>    }
> 
> John..  Thank you for the reply!  Just a couple of things I don't
> understand...
> 
> 1.)   > # set the in-place edit variable
>       > # cannot be '' on Windows
>       > $^I = '.bak';
> 
> This worked great on WinXP but when I went home and tried it on Linux it did
> not work.  Which is what, I'm sure your comments ment.. :~)  How would I
> write $^I = '.bak'; on Linux? 

I have used it many times on Linux and it has worked for me.  What does
"it did not work" mean exactly?


> 2.)  The subsitution didn't work on some of the files...  could this have to
> do w/ CR or LF?

It could be anything, it is hard to tell without seeing the actual
program and data.



John
-- 
use Perl;
program
fulfillment

-- 
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