What directory is $file in? is it the same one that $dir is in?
If you're planning to filetest the return values out of a readdir, you'd better prepend the directory in question. Otherwise, because we didn't chdir there, it would have been testing the wrong file.
http://perldoc.perl.org/functions/readdir.html
In reply to Re: Cannot open file within a loop
by huck
in thread Cannot open file within a loop
by ic23oluk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |