in reply to Re: Perl List files in directory
in thread Perl List files in directory

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.

Replies are listed 'Best First'.
Re^3: Perl List files in directory
by Anonymous Monk on Apr 22, 2014 at 14:31 UTC

    I did that, i only get: "Cannot open dir: No such file or directory at ./script.pl line 28".

    which doesn't had much.

      It tells us that /opt/tmp does not exist.