Re: Substitute a word in a file

2002-12-05 Thread George P.
e file is a simple text file. > > > > Does anyone know how to do this ? > > > > Thanks. > > George P. > > > > >From [EMAIL PROTECTED] Thu Dec 5 15:39:54 2002 Date: Wed, 4 Dec 2002 19:40:54 -1000 From: Beau E. Cox <[EMAIL PROTECTED]> To: George P

RE: Substitute a word in a file

2002-12-04 Thread Beau E. Cox
Hi - Try something like this (untested) pseudocode: open (FILE, "+<$filename") or die ...; # now get to the word you want; you can # read the file line by line counting bytes read # or use tell() my $pos = 0; while () { # --some test for your word-- # for this example we are looking for 'fo

Re: Substitute a word in a file

2002-12-04 Thread Tanton Gibbs
perldoc -q "How do I change one line in a file" - Original Message - From: "George P." <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, December 05, 2002 12:17 AM Subject: Substitute a word in a file > > Hi, > > I am looking for a way to open a file in read/write mode, > see