sub test { my %hash = @_; print "$_ => $hash{$_}$/" foreach keys %hash;}my %h = ( A => 100, B => 200, C => 300 );test(%h);
1
2
3
4
5
6
7
sub test {
my %hash = @_;
print "$_ => $hash{$_}$/" foreach keys %hash;
}
my %h = ( A => 100, B => 200, C => 300 );
test(%h);