in reply to Can't use string ("2") as a HASH ref while "strict refs" in use
Basically, $Myhash{$item} == 2, not a ref to a hash like you think it does. Your problem is probably in where you assign the values, not in the code you showed us.
Also, why are you iterating over hashes to find a value? You could just use the hashes.
$item = $Myhash{$My_Value};
and so on...?
Try adding this:
use Data::Dumper; ... your code ... print Dumper(\%Myhash)."\n";
And see if %Myhash looks like you think it does.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Can't use string ("2") as a HASH ref while "strict refs" in use
by Anonymous Monk on Jul 17, 2008 at 17:25 UTC | |
by chakram88 (Pilgrim) on Jul 17, 2008 at 18:05 UTC | |
by pileofrogs (Priest) on Jul 17, 2008 at 18:23 UTC | |
|