As you have already been advised in Re: Perl List files in directory, please make your error messages more informative:
opendir(DIR, "/opt/tmp/") or die "Cannot open dir: $!";
This will tell you the immediate cause of the problem.
In reply to Re^2: Perl List files in directory
by Corion
in thread Perl List files in directory
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |