- or download this
use warnings;
use strict;
- or download this
my %type;
@type{qw(AB AC AD AE FG)} = (0) x 5;
- or download this
##then you have something like this:
$VAR1 = {
...
'AD' => 0
};
- or download this
while(...){
...
$type{$_}++; ## increasing the counting as you see needed string
...
}