basm100 has asked for the wisdom of the Perl Monks concerning the following question:
My script writes data to a file, and I then want to read data from that same file in the next part of my script.
I tried closing the filehandle and reopening as a read file, but it threw up the error "open for writing at line..."
Is there an easy way to open a file for both reading and writing ? Thanx,
basm100
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Writing to file and reading from same file
by jmcnamara (Monsignor) on Feb 27, 2002 at 12:01 UTC | |
|
Re: Writing to file and reading from same file
by projekt21 (Friar) on Feb 27, 2002 at 11:38 UTC |