in reply to how to print value at reference?

It's a array ref not hash ref, if you get something like HASH(0xbb99fdx), then it's a hash ref. To get the value from the array ref, you need to dereference it, example like
my $test = [ "Hello", "PM" ]; #print $test, you will get array ref @array_deref = @{$test}; #dereferencing the array ref print"@array_deref\n";