I can manipulate a single array element and add a reference to the array as a value in a hash. Easy. For example, this achieves the desired result:
# split the line into an array
my @array = split;
# convert the second element from hex to dec
$array[1] = hex($array[1]);
# now add the array to a hash
$hash{$name}{ ++$count{$name} } = \@array;
My question: Is it possible to do the same thing using an anonymous array? I can get close by doing the following:
$hash{$name}{ ++$count{$name} } = [ split ];
However, this doesn't manipulate the second index (convert hex to dec) of the anonymous array. If it can be done, how?