in reply to Passing hashes as arguments to a sub?

Would this do it?

my %hash = @_;

#!/bin/perl5 use strict; use warnings; my %hash = ( one => 1, two => 2, ); my_sub(%hash); sub my_sub{ my %hash = @_; for my $key (keys %hash){ print "$key -> $hash{$key}\n"; } }

update: added snippet

.