我无法弄清楚为什么该else
部分没有被执行:
opendir (DIR_03, "$dir_01"."/"."$dir_02"."/"."$file");
@ANR=readdir(DIR_03);
close(DIR_03);
foreach my $anr_file (@ANR) {
chomp($anr_file);
if( $anr_file ne "traces.txt" ||
$anr_file ne "traces_system.txt" ||
$anr_file ne "traces_SystemServer_WDT.txt") {
return("TraceFileNotFound");
} else {
return("TraceFileFound");
}
}