$hash{$word1}{$word2}{$word3} = $count #### $hash{$word1}{$word2}{$word3} = { count => $count, freq => $frequency } #### $hash{$word1}{$word2} = { total_counts => $tot_counts, words => { $word3 => $count, } } #### $hash{$word1}{$word2}{total_counts}++; $hash{$word1}{$word2}{words}{$word3}++;