in reply to Re^2: -d on windows
in thread -d on windows
use File::Spec::Functions qw( catfile ); my $dir = "e:\\core\\ops_utilities"; opendir(my $dh, $dir) or die("Unable to read utilities directory \"$dir\": $!\n"); my @files = grep { !-d catfile($dir, $_) } readdir($dh);
The following might be more useful:
my @files = grep { !-d } map { catdir($dir, $_) } readdir($dh);
|
|---|