The filenames returned from readdir are relative. You can either chdir to the directory or add the file path:
chdir '/var/log/cr_user/'; # or use File::Spec; my $dir = '/var/log/cr_user/'; my @files = map { File::Spec->catfile( $dir, $_ ) } grep { $_ !~ /^\.{1,2}/ } readdir DIR;
In reply to Re: Re: Re: Opening Unknown Filenames
by chromatic
in thread Opening Unknown Filenames
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |