Perl already tells you where your problem is. In line 118.
You haven't shown us the values of $cds or $RC, and you don't show us the line 118 from your script.
From the error message Can't use string ("75") as a HASH ref and from the data you've showed, I can guess that your script tries to use the 75 from this hash entry:
'XM_010928396.1 ' => { 'ambigu' => 156, 'BC11_III_.RG' => 75, 'rc' => 195, 'BC11_II_.RG' => 120 },
Maybe you want to rerun your script using only this data, and then you should easily find out where your problem is.
Maybe you want to reduce your deep diving through the data structure into several steps, giving Perl the chance to be more to the point with its error messages:
# Convert this: values %{$hash_geno_group{$sample_geno_group}{$cds}{"rc"}} # to this: my $sample_geno_group_ref = $hash_geno_group{$sample_geno_group}; my $sample_cds = $sample_geno_group_ref->{$cds}; my $sample_rc = $sample_cds->{"rc"};
Maybe also output the Dumper of each step so you can see where you are within your data structure.
In reply to Re^3: Can't use string ("0") as a HASH ref while "strict refs" problem
by Corion
in thread Can't use string ("0") as a HASH ref while "strict refs" problem
by etricaen
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |