sub foo { my $hash_ref = shift; print "$_\n" for values %$hash_ref; }