getting the error..
Name 'main::FILE" used only once: possible typo at line 9
Use of uniniitalized value in concatenation <.> or string
and
Attemping line: 302 Moved Temporarily
not sure what that means
use strict;
use warnings;
my $FILE = undef;
my $filename = 'C:\tmp\blah.txt';
open( $FILE, '<', $filename ) or die "Can't open $filename: $!";
while(<$FILE>) {
...
}
close $FILE or die "Close failed";
Works for me. It expects a directory called tmp on the current 'drive' (partition). mkdir tmp creates it. The problem with using backslashes as a directory separator is that you then MUST use single quotes around them, or 'escape' them. It is an easy mistake to put the filename inside double quotes. / is much safer, and works on Windoze happily.