Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What Does "readline() on closed filehandle INFILE" mean? Please Help.

Status
Not open for further replies.

tristero

Programmer
Jan 24, 2003
95
US
I keep trying to run my script and I get the error:

Code:
readline() on closed filehandle INFILE

what does this mean? btw, INFILE is the name of a file which I am trying to read into an array.
(e.g.
Code:
@input = <INFILE>;
)
I had it working, but now I'm stumped... please help.
 
Make sure to &quot;
Code:
or die
&quot; in your
Code:
open
statement. It's probably returning an error and not opening the filehandle. Eg:
Code:
 open(INFILE, $file) or die &quot;Could not open $file: $!&quot;;
Sincerely,

Tom Anderson
Order amid Chaos, Inc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top