You could add another level below variants
poj#!/usr/bin/perl use strict; use warnings; use Data::Dumper; my %hash; while (my $line = <DATA>){ my ($tag1, $tag2, $tag3) = split /\t/, $line; if ($tag2 =~/NN/) { ++$hash{$tag3}{frequency}; ++$hash{$tag3}{variants}{$tag1}; } } print Dumper \%hash;
In reply to Re: multi dimensional hash
by poj
in thread multi dimensional hash
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |