in reply to "Scalar found where operator expected", references
You can either make a complete copy of the hash by doingmy %hash = $$hashref;
or more efficiently, just delete that line and always directly use the hashref, egmy %hash = %$hashref;
foreach my $key (keys %$hashref) { my $weight = $hashref->{$key}; ...
Dave.
|
|---|