Hi Monks,
I want to use grep or map for the following refrence to find the child keys of 'Orange'.
use warnings; use strict; my $xml = { 'Fruits' => [ { 'Season' => { 'Apple' => { 'UnitsAvailable'=> ['100'] }, 'Orange' => { 'UnitsAvailable' => ['200'] } } } ] };
I tried the following code, but it is not finding
my @res = grep (/Orange/, $xml);
Please help to find the child keys of Orange.
Thanks
Rose
In reply to grep in hash of array by rose
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |