thudzj has asked for the wisdom of the Perl Monks concerning the following question:
I use hash of hashes and maybe many layer of hashes,and I often run into the error message like in my title! now I have some codes as follows
#!/bin/perl -w use strict; my $site_file=$ARGV[0]; #input the methylation site info my %site_info=(); open(IN_site,"<$site_file"); while(<IN_site>) { chomp; my @arr=split(/\t/,$_,4); if($arr[0] eq "MULTI"){next;} my @chr_temp=split //,$arr[0]; for(1..3) { shift(@chr_temp); } $arr[0]=join("",@chr_temp); $site_info{$arr[0]}{$arr[1]}{"strand"}=$arr[2]; $site_info{$arr[0]{$arr[1]}}{"value"}=$arr[3]; } close IN_site;
i try to use hashes of hashes of hashes to input my $site_flie, and the all the lines have the formats as follows:
chr16 28797601 - 0.777877
I use a lot of there kinds of hashes and this kind of problem often happens,please help me!
Thanks in advance!
I do not want remove use strick
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Can't use string ("16") as a HASH ref while "strict refs" in use
by CountZero (Bishop) on Jun 30, 2012 at 08:12 UTC | |
by thudzj (Initiate) on Aug 23, 2012 at 02:55 UTC | |
|
Re: Can't use string ("16") as a HASH ref while "strict refs" in use
by AnomalousMonk (Archbishop) on Jun 30, 2012 at 12:21 UTC | |
by thudzj (Initiate) on Aug 23, 2012 at 02:59 UTC | |
|
Re: Can't use string ("16") as a HASH ref while "strict refs" in use
by Marshall (Canon) on Jun 30, 2012 at 13:33 UTC |