# this $count{$param1} = $param1 * $param2; # to this for example $count{$param1}{$param2}{'count'} = $param1 * $param2; #### # this ++$hashref->{ $key }; # to this for example ++$hashref->{ $key }->{'count'}