in reply to Passing hashes to subs?
You cannot pass the hash as you did without distroying it. It is being flattened into a list. Pass it by reference :
callsub(\%hashtopass); sub callsub { my $hashref = shift; foreach my $k (keys %$hashref) { .. ..
read more about references
|
|---|