Reminder: Hashes are indexed with curly braces: perl -e 'my %data; $data{"hello"}="world"; print($data{"hello"}, "\n");' (prints world) Reminder: There is a difference between hashes and hash references: Hash (via %): perl -e 'my %hash=( hi => "hello" ); print($hash{"hi"}, "\n");' Hash reference (via $): perl -e 'my $hash_ref = {hello => "world"}; print($hash_ref->{hello}, "\n");' If you want to pass the reference instead of a copy, you need to use operator \%hash You can use Data::Dumper to dump variables: perl -e 'use Data::Dumper; my %data; $data{"hello"}="world"; print(Dumper($data{"hello"}), "\n");' (prints $VAR1 = 'world';)