in reply to Opening a file for reading or writing (was: Newbie)
The error describes relatively good what went wrong. FILE was only opened for writing, whereas you want to read from it.
So, go back and recreate the content in that file (it's gone by now) and then open the file for reading :
open FILE, "< $file" or die "Couldn't open $file for reading : $!\n" +; while (<FILE>) { print $_; };
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Opening a file for reading or writing (was: Newbie)
by padangboy (Initiate) on Mar 18, 2001 at 01:23 UTC | |
by Corion (Patriarch) on Mar 18, 2001 at 01:32 UTC | |
by premchai21 (Curate) on Mar 18, 2001 at 01:47 UTC |