%g_wvr_list = (); %g_log_err = (); @tmpArr = (); #get errors from waiver list open(IFP0,"<$opt_wvr_file"); @tmpArr=; foreach $el (@tmpArr){ chomp($el); $g_wvr_list{"$el"}=1; } close(IFP0); #get errors from test log file @tmpArr=`grep -iw error $opt_test_log`; $errorCnt=$#tmpArr+1; #pass /fail $waived=0; printDbg(@tmpArr); foreach $key ( keys(%g_wvr_list) ){ printDbg("wvr List $key"); @matchErr = grep( /\Q$key\E/ , @tmpArr ); printDbg("matchErrCnt {$#matchErr}"); printDbg("matchErrCnt {@matchErr}"); $waived+= @matchErr if( $#matchErr + 1 > 0 ); }