Re: open > file && s/ / /;



Brian Volk wrote:
>
>>From: John W. Krahn [mailto:krahnj@xxxxxxxxx]
>>
>># 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
.



Relevant Pages

  • Re: Vista beta vs. OSX
    ... >>> the Holy Scriptures? ... Provenance would be something like an ancient Egyptian tomb ... will ACCEPT AS REALITY that the COPIES of no-longer-extant ORIGINALS of ... St. John the Beloved, who was ...
    (comp.sys.mac.advocacy)
  • RE: John The Ripper For Win32
    ... Linux CD and you are good to go. ... John The Ripper For Win32 ... Audit your website security with Acunetix Web Vulnerability Scanner: ... Up to 75% of cyber attacks are launched on shopping carts, ...
    (Pen-Test)
  • Re: [opensuse] antivirus
    ... John B Pace wrote: ... Now that you know it is none of your business, ... old time linux language that doe drive users away. ... They're for the purpose of protecting Windows clients ...
    (SuSE)
  • Re: Attempting to port and app to linux but cant find an equivalent system call
    ... An Operating system that permits one process to modify another process' memory ... Linux, like it's Unix forefathers, does not permit such uncontrolled access. ...
    (comp.os.linux.development.apps)
  • Re: Attempting to port and app to linux but cant find an equivalent system call
    ... |>>cannot find anything in linux remotely like the following... ... |>An Operating system that permits one process to modify another process' memory ... Your parent process can use fork/execto launch the program to be ...
    (comp.os.linux.development.apps)