use strict; use warnings; my %hash = (key1 => 1, key2 => 2, key3 => 3); work_with_reference(\%hash); sub work_with_reference {  my $hash = shift;  for (keys %$hash) {     print "$_:$hash->{$_}\n";  } }