I am working on parsing the few .xlsx sheets to create a new sheet with there conditional data usage. I came through the following data structure and didn't understand if its array of hashes or hashes of hashes. I dumped the following data structure using dump command.
print Dumper $hash_reg_list{first_type}{registers};
[
{
'fields' => [
{
'field_name' => ' IP_NAME_AACTV_SFE'
},
{
'field_name' => ' IP_NAME_AACTV_PP'
},
],
'register_name' => ' IP_NAME_AACTV'
},
{
'fields' => [
{
'field_name' => ' IP_NAME_CONFIG_LO_KHD_L2DEMOTE'
}
],
'register_name' => ' IP_NAME_CONFIG'
},
{
'fields' => [
{
'field_name' => ' IP_NAME_JIK_FE_MIN_TST'
},
{
'field_name' => ' IP_NAME_JIK_TM_LOOPA_HYU'
}
],
'register_name' => ' IP_NAME_JIK'
},
]
I want to print all register_name from the above data structure.
my @sorted_mm_register_list_1;
foreach my $register_name (sort keys %hash_reg_list{first_type}{registers})
{
$sorted_mm_register_list_1[$list_index] = $register_name;
$list_index++;
print "$hash_reg_list{first_type}{registers}{register_name}";
printf("listindex: %s\n", $list_index);
}
How shall I trace back the following data structure dumped from the PERL? Any help would be appreciated?