opendir (CLEANPATH, "$path") or my $openfailed = "TRUE"; if ( defined $openfailed ) { warn "Could not open directory, $path : $!\n"; next; }