readdir is the devil, use Path::Tiny, it throws "exceptions" like autodie
use Path::Tiny qw/ path /; my @files = path( $dirpath )->realpath->children(); for my $file( @files ){ my $fh = path( $file )->openr_raw; while( <$fh> ){ ... } }
In reply to Re: cant open files from a directory (Path::Tiny)
by Anonymous Monk
in thread cant open files from a directory
by garny
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |