in reply to Re: problem in output
in thread problem in output

Yes! This appears to be a simple peg count of particular lines. I don't see the need for anything complex. Maybe the Op can tell us if this works? Of course some tweaking of the regex'es...but looks like straight line code to me. I echo previous comments about "use strict; use warnings;".
while( my $line = <$log> ) { $Success_ArcotID_Count++ if ($line =~ /ArcotID\s*Auth\s*SUCCESS.*/); $Failure_ArcotID_Count++ if ($line =~ /Auth failed.*/); $Success_QnA_Count++ if ($line =~ /QNA Auth - Success.*/); $Failure_QnA_Count++ if ($line =~ /Message: QNA Auth Failed.*/); $Success_OTP_Count++ if ($line =~ /OTP SUCCESS.*/); $Failure_OTP_Count++ if ($line =~ /Message: OTP FAILED.*/); $Success_UP_Count++ if ($line =~ /UPAuth SUCCESS.*/); $Failure_UP_Count++ if ($line =~ /UPAuth FAILED.*/); }
If the above does indeed "work" in this application, it can be re-written so that token before either "SUCCESS" or "FAILED" creates a hash table peg count without needing this big "=0" declaration at the front.

I think others have covered the open ">$file" "clobbers previous $file" problem. If you want append, use ">>" for the open. Glob isn't portable, but that's a different subject. Get the basic stuff working and then we'll talk about that detail.