in reply to Re: cant open files from a directory
in thread cant open files from a directory
my @files = grep { -f } map { "$dir/$_" } readdir($dirhandle);
To combat the excessive grepping & mapping going on above ...
my @files = map { -f $_ ?"$dir/$_" : () } readdir( $dirhandle ) ;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: cant open files from a directory
by kcott (Archbishop) on Feb 01, 2014 at 05:53 UTC | |
by Anonymous Monk on Feb 01, 2014 at 07:56 UTC |