develooper Front page | perl.beginners | Postings from April 2002

Please Help

Thread Next
From:
Josef E. Galea
Date:
April 30, 2002 12:21
Subject:
Please Help
Message ID:
002201c1f07d$15712780$b9669ec3@josvio
Hi 
I am a student an I'm new to Perl. For a university assignment I need to read the contents of a text file in an array. I am using Windows. The code I am writing is:

$file = "/test.txt";
open (INFO, "$file");
@lines = <INFO>;
close(INFO);

Altough this is supposed to work, I am getting a ''readline() on closed filehand INFO at line 3' message when I interpret it with perl -w. Please Help
  

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About