in reply to Parsing a log file

Maybe this will help you:
my %suffix; open(LOG, "logfile") or die $!; while (<LOG>) { next if /^#/; $suffix{$1}++ if /.+(\.\w{3,4}\s\d{3})$/; } close LOGS; for (sort keys %suffix) { print "$_ => $suffix{$_}\n"; }
This example supposes that the filetype consists of 3 or 4 literal letters and the unique codes consist of 3 numbers. Of course, every filetype should have it's own code.