I am trying to retreive the the individual elements of the array stored as a reference.
my @list = ("three 13 3 1 91 3", "one 11 5 1 45 1",
"two 12 7 1 33 2", "four 14 1 1 26 4");
my @refList = map { [$_, (split)[-1]] } @list;
# see what it is in @refList
use Data::Dumper;
print Dumper(@refList);
print "\n the value is $refList[0][0][1]";
Output
$VAR1 = [
'three 13 3 1 91 3',
'3'
];
$VAR2 = [
'one 11 5 1 45 1',
'1'
];
$VAR3 = [
'two 12 7 1 33 2',
'2'
];
$VAR4 = [
'four 14 1 1 26 4',
'4'
];
the value is
But i need the output of
print "\n the value is $refList[0][0][1]" as 13
How to get the value
1 Answer