Now I am pretty new at perl, but I have been a C programmer for over 15
years. If perl allows you to magically insert into a file that would be
amazing.
I tested the code below and note that this is not INSERTING text into the
file, but overwriting existing characters that are already in the file.
If there is a way of inserting into the file without needing to rewrite the
remainder of the file (or writing a function to do it) I would be quite
interested in how that is done.
Gary Forest
Radiation Oncology
Marshfield Clinic
[EMAIL PROTECTED]
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 25, 2001 3:01 PM
To: [EMAIL PROTECTED]
Subject: Re: inserting text into file
: Could this be a buffering problem?
: Maybe $|=1 at the top of the script would help?
: Does it need a seek()? Hmm....
seek() does appear to work:
open GBOOK, "+<guestbook" or die "Can't open guestbook: $!";
seek GBOOK, 0, 0;
print GBOOK ...
close GBOOK;
-- tdk