foreach my $Postpaid_file (@Postpaid_files) { open (POST ,"$Postpaid_file") or print "cannot open file\n"; while(my $cdr_post_line = ) { chomp $cdr_post_line; my @cdr_post_array = split(/\|/,$cdr_post_line); if ($cdr_post_array[12] eq "GSM" && $cdr_post_array[9] eq "Submit") { $cdr_post_MO_cnt++ if any { /^\Q$cdr_post_array[11]\E$/ } @MOresp_error; $Total_GSM_attempts++ unless any { /^\Q$cdr_post_array[11]\E$/ } @MOresp_error; } if ($cdr_post_array[12] eq "SMPP" && $cdr_post_array[9] eq "Submit" && $cdr_post_array[10] eq "0") { $cdr_post_AO_cnt++; #if any { /^\Q$cdr_post_array[11]\E$/ } @MOresp_error; $total_AO_success++ unless any { /^\Q$cdr_post_array[11]\E$/ } @MOresp_error; $Total_SMPP_attempts++ unless any { /^\Q$cdr_post_array[11]\E$/ } @MOresp_error; } if ($cdr_post_array[12] eq "GSM" && ($cdr_post_array[13] eq "GSM" || $cdr_post_array[13] eq "ESMEGW") && $cdr_post_array[9] eq "Submit") { $total_MT_P2P++ unless any { /^\Q$cdr_post_array[11]\E$/ } @MOresp_error; } if ($cdr_post_array[12] eq "GSM" && ($cdr_post_array[13] eq "GSM" || $cdr_post_array[13] eq "ESMEGW") && $cdr_post_array[9] eq "Submit" && $cdr_post_array[7] eq "Delivered") { $total_MT_P2P_success++; }