in reply to Foreach hash of array

To loop through a hash you have the reference to, use

foreach my $f ( keys %$xml ) { ... $xml->{$f} ... }
Now this will loop only through the highest hierarchy of your construct, so $f will be 'Fruits' and then the loop is already finished. To get to the data underneath you have to recursively descend or know exactly what you are looking for.

Please be more specific when asking questions. You also might read a book on data structures.