dirtdart has asked for the wisdom of the Perl Monks concerning the following question:
results in the error "Use of unitialized variable $size in concatation..." pointing at the "print" line. If I use the test: if(-s $filename > 0) It never returns true. I've also tried replacing -s with -e just to see if the true/false works and it never returns true. The CGI program creates the file that it's attempting to size, so I don't believe permissions would be an issue. What else could stop these file test from working properly?my $size = -e $filename; print "$filename size is $size\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: File tests failing
by lostjimmy (Chaplain) on May 22, 2009 at 18:37 UTC | |
|
Re: File tests failing
by graff (Chancellor) on May 23, 2009 at 00:05 UTC |