# make a hash my $x = {1..4}; # Reference %x to $x [ $x->{1}, %$x->{1} ]; # Set variable $x $x->{1} = 'hi'; # Set $_ $_ = 1; # print the reference of $x print(%$x->{$_});