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.
___________In reply to Re: XML tree to HASH
by eric256
in thread XML tree to HASH
by bugsbunny
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |