my $hashref = sub { my %list = (1 => 'test'); return \%list; }->(); print $hashref->{1},"\n";