my $hash_ref = mysub(); foreach my $key (keys %$hash_ref) { print "$k = $hash_ref->{$k}\n"; }