![]() |
|
There's more than one way to do things | |
PerlMonks |
Re: XML tree to HASHby eric256 (Parson) |
on Aug 15, 2003 at 15:06 UTC ( #284173=note: print w/replies, xml ) | Need Help?? |
You could store the info $hash{$element}{$parentID} = 1; Then if ($hash{$element}{$parentID}) would tell you if it was a parent or not. I'm not sure if its any better than sticking them all in a string and regexing it. If you do regex make sure to delimit each id so that checking for 2 doesn't match the 2 in 20. ___________Eric Hodges
In Section
Seekers of Perl Wisdom
|
|