sub foo { my %hash = @_; for my $key ( keys %hash ) { print "$key : ", $hash{$key}, "\n"; } }