while(my $f = readdir($dh)){ next if -d "$dir/$f";