You wrote:
opendir(DIR, "/opt/tmp/" or die "Cannot open dir");
whereas what you probably meant was:
opendir(DIR, "/opt/tmp/") or die "Cannot open dir";Better would be:
opendir(DIR, "/opt/tmp/") or die "Cannot open dir: $!";Perhaps better still would be DirHandle but YMMV.
In reply to Re: Perl List files in directory
by hippo
in thread Perl List files in directory
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |