in reply to Filehandle opened only for output error
In your open statement, using the 3-argument version of open, you have specified '>' which means that you want the file opened for "output" only.
In the next line you then proceed to try to read from that file (i.e., you try to use the file for "input"). But you didn't open the file for input...only for output.
If you need to read (i.e., input) from the file, then you need to open the file for input. You do that, in the 3-argume open, by specifying '<' as the 2nd argument instead of the '>' that you used.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Filehandle opened only for output error
by Sismetic (Initiate) on Aug 21, 2009 at 16:43 UTC | |
by ikegami (Patriarch) on Aug 21, 2009 at 17:16 UTC | |
by baxy77bax (Deacon) on Aug 21, 2009 at 17:07 UTC |