Re: In line editing? Streaming through perl directly into another app?

2002-02-28 Thread Randal L. Schwartz
> "Steven" == Steven M Klass <[EMAIL PROTECTED]> writes: Steven> Open file open FILE, " Start tool open TOOL, "|my_tool with params here" or die; Steven> Read line by line, edit as neccessary while () { s/this/that/; Steven> Feed line by line my data into the tool print TOOL $_; }

In line editing? Streaming through perl directly into anotherapp?

2002-02-28 Thread Steven M. Klass
Hi all Ok, my tool is comming along nicely, but here is where I am stuck at. I currently am opening a file and reading the contents. Then I open a second file, where I put my modification to the first file. Then this file is fed to the destination tool. I think this is a BIT redunda

Re: In-line editing..

2002-02-07 Thread Jon Molin
"Steven M. Klass" wrote: > > Hi all, > > Here is the general problem. I have a file that I need to edit but can't. im not sure i follow you here, making a backup copy is not an option? perl -pi.bak -e 's/foo/bar/g' weird_uneditable_file;some_app weird_uneditable_file;mv weird_uneditab

Re: In-line editing..

2002-02-06 Thread John W. Krahn
"Steven M. Klass" wrote: > > Hi all, > > Here is the general problem. I have a file that I need to edit but can't. > That file is then fed into another program. Think of the file that I want to > edit is like a makefile, that I want to use after I tweak it a bit. The > general idea wo

In-line editing..

2002-02-06 Thread Steven M. Klass
Hi all, Here is the general problem. I have a file that I need to edit but can't. That file is then fed into another program. Think of the file that I want to edit is like a makefile, that I want to use after I tweak it a bit. The general idea would be: 1) Find out what needs to be