my @files = grep { -f } map { "$dir/$_" } readdir($dirhandle);
To combat the excessive grepping & mapping going on above ...
my @files = map { -f $_ ?"$dir/$_" : () } readdir( $dirhandle ) ;
In reply to Re^2: cant open files from a directory
by Anonymous Monk
in thread cant open files from a directory
by garny
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |