Before I use to countfreq for an element using $Elementsfreq{$Element}++; Now to increment the count, do I have to have another variable?, Could you please tell me what is wrong with the following?: $countElements++; %Elementsfreq = ($Element => [$countElements, [ 0..$index ] ]); $bigramfrequency{$bigram}[0]++; $bigramfrequency{$bigram}[1][$position]++;