in reply to Help me to run linux command in windows

This should work on windows just fine:

my $fileDir = someawesomepath; opendir(DIR, "$fileDir") || die $!; while (defined(my $file = readdir(DIR))) { next if $file =~ /^\.\.?$/; # Skip the DIR #do stuff with $file } closedir(DIR);