in reply to parse hash to sub
Do it this way instead:
By passing %new_db as a hash-reference, $_[1] refers to the hash-ref, which is then de-referenced into the %packages hash like you want.new_packages($fcount,\%new_db); sub new_packages { my %packages = %{$_[1]}; ...
Most all of the time if you need to pass an array or hash into a sub you'll want to pass it by reference, not by value. :-)
Gary Blackburn
Trained Killer
|
|---|