tags:

views:

52

answers:

1

for ex :

my @array = @{$element->{$key}{'test'}}} ;

print @array;  # its shows array reference 

use Data::Dumper ;

print Dumper @array ; 

 # it print $VAR1 =  [  '1'
                         2'
                     ]

How to access these values and how deference array

+3  A: 

Try:

print $array[0]->[0];
print $array[0]->[1];

It looks like @array is ending up as an array that holds just one element; that one element is a reference to an array holding 1 & 2.

psmears
Why `->` twice when one with suffice?
Zaid
@Zaid: typo, now fixed!
psmears