my %count=(); # A hash -it is bcos of of key/value pairs? while (<$fh>){ if (/amavis.*(Passed|Blocked) (CLEAN|SPAM|INFECTED|BANNED)/){ ++$count{$2}; # Why ++$count? why {$2} here? is it bcos of (Passed|Blocked) ? } elsif (/amavis.*(BAD-HEADER)-/) { ++$count{$1}; # why {$1} here? is it bcos of (BAD-HEADER) } elsif (/reject/){ ++$count{'REJECTED'}; #Hmm, Why {'REJECTED'}? } }