Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
A snippet of the code which i used is as followsquery us 123 --> this line it failed queue ca 456
I have fixed the code and changed the hash structure and it works fine now.if ($query eq $hash{'query'}){ push @{$hash{$query}},{'domain' => $domain ,'count' => $count} +; $tot_count += $count; } else{ my $qid = $hash{'query'}; .... some operations %hash=(); $hash{'query'}= $query; push @{$hash{$query}},{'domain' => $domain ,'count' => $count} +; $tot_count = $count; }
Edit by GrandFather - replaced pre tags with code tags, to prevent distortion of site layout and allow code extraction.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Can't use string ("query") as an ARRAY ref error
by ikegami (Patriarch) on Aug 28, 2009 at 00:46 UTC | |
by Anonymous Monk on Aug 28, 2009 at 01:18 UTC | |
by ikegami (Patriarch) on Aug 28, 2009 at 02:49 UTC |