#!/usr/bin/perl use strict; use Data::Dumper; my %hash1 = ( foo => my ($bar) ); $bar = 2; my %hash2 = ( foo => \my $bar2 ); $bar2 = 2; print Data::Dumper->Dump([\%hash1,\%hash2], [qw(*hash1 *hash2)]);