my $ref = do { my %list = ( 1 => 'test' ); \%list; }; print $ref, $/; print $ref->{1}, $/;