[Bristolbathpm] a hash of hashes, too many errors

psykx.out psykx.out at googlemail.com
Tue May 20 22:42:10 BST 2008


Hey I'm getting this error

Useless use of hash element in void context at ./three.pl line 97.

I have googled it and found that I am probably treating a scalar like a 
hash reference but I can't see where. below is the offending lines

90    if( defined $thash{$k[$key]} ){
91    $n = $result;
92    while( !defined $high ){
93            $n++;
94        if ( ${$thash}{$k[$key]}{$j} => $result ){
95                $high = ${$thash}{$k[$key]}{$j};
96            }
97    }

Yes those are the correct line numbers I think I just have sooo many 
errors. $thash is a reference to a multidimensional hash (2D), $key is 
an int and $k is an array reference.

Cheers max

p.s this isn't for work


More information about the BristolBathPM mailing list