Works on Linux with a known file, running it from a shell. Change the open statement to
open(INFO, $file) || die "No such file '$file':"; # Open the file
Also run it from a command line; you should see the errors:
perl -w myscript.pl
Finally, double-clicking it mayn't give perl a place to send the output.
Thank you for teaching me how to open it properly. I get a error now too, thanks to -w.
"readline() on closed filehandle INFO at testperl.pl line 4." Line 4 is @lines = ; BTW. Oh, and also I added the || die('Error'); and it didn't show anything, so isn't the file that can't be opened. Oh, and also I made a new file as a text file, and it didn't open.
Thanks so much.