![]() |
|
Don't ask to ask, just ask | |
PerlMonks |
Re^3: xml simple not a hash referenceby Anonyrnous Monk (Hermit) |
on Dec 28, 2010 at 15:00 UTC ( #879441=note: print w/replies, xml ) | Need Help?? |
I don't know how to loop through the mealtypes The same way you're looping through the roomtypes:
but don't forget to apply ForceArray to mealtype, too; or check with ref if $e->{mealtypes}->{mealtype} is an array reference, and only loop in that case (otherwise, you'd get an error if there's only one mealtype entry, in which case XML::Simple (without ForceArray in effect) would not create an extra array...)
In Section
Seekers of Perl Wisdom
|
|