sub foo{ my (%hash) = @_; #! Wrong! for my $key (keys %hash) { do stuff } } ... foo( %hash ); #! Wrong!