would like to know whether it is working or not.Only you know if your code is working the way you want it to work. I don't follow your description of your requirements. That being said, the following looks suspicious:
Your data structure is a hash of hashes of ... scalar references. Did you really want a hash of hashes of arrays?my ($id, $sum, $haploStr) = split ('\t',$_); push @{$data{$id}{$sum}}, \$haploStr;
Use Data::Dumper after your while loop to get a better idea of what I'm taking about:my ($id, $sum, @haploStr) = split ('\t',$_); push @{$data{$id}{$sum}}, \@haploStr;
print Dumper(\%data);
I am using "undef" to remove the pattern which is matching (while iterating -- which I think is not good way of programing,I agree that using undef seems unconventional here. Perhaps you want to delete?
In reply to Re: Extract the common values in hash of array with double keys
by toolic
in thread Extract the common values in hash of array with double keys
by snape
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |