in reply to Re^2: Unsuccessful stat on file test
in thread Unsuccessful stat on file test
my @answer; return "File does not exist\n"; # <- extra semicolon! unless -e $_;
The next problem is:
If your program is named filetest.pl and you call it like:while (<>) {
that loop is actually going to read each line of all the *.txt files in your current directory, and unless each line actually happens to be the name of a file in that directory, your program will correctly tell you that the file does not exists!./filetest.pl *.txt
Try adding some extra output (what is $_ ?)
cheers
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Unsuccessful stat on file test
by bluethundr (Pilgrim) on Mar 03, 2008 at 05:06 UTC |