in reply to how to print value at reference?

To help you understand the underlying data structures that you have created, use the Data::Dumper module. An example follows, using a $test variable proposed elsewhere in this thread:

use strict; use warnings; use Data::Dumper; my $test = [ "Hello", "PM" ]; print (( Data::Dumper->new([ \$test ], [qw( *test )]))->Dump); # or # my $dd = Data::Dumper->new([ \$test ], [qw( *test )]); # print $dd->Dump;