I'm taking a Perl class and and I'm working on comprehending this script in one of the lessons. This script has you count words in a file. The line where one is supposed to read in the file being counted is like so:

while (defined($line = <>))

However, when I type this in: perl countwords.pl history.txt

Nothing happens. This lesson that I'm working on is working from the premise that people are using a Windows Perl installation. So it looks like I need to change the line above so that it will work in my setup. What would be a good way to change this line?


-- Lola - mailto:[EMAIL PROTECTED] http://www.lolajl.net | Blog at http://www.lolajl.net/blog/ Terrorism delenda est! (Terrorism must be destroyed utterly!) I'm in Bowie, MD, USA, halfway between DC and Annapolis.

Reply via email to