in reply to UPDATED: Recursive function adds data to a hash/array
The [] creates an anonmyous array that is attached as a reference to $groups[$gcount]{sub}.$groups[$gcount]{sub}=[@subgroup]; my $first_data = $groups[0]{sub}[0];
Update: My gues is that the code is parsing nested tags. The sub recursively calls itself on the string $newvalue found between a pair of tags. When there is no more text to parse, the recursion ends. While parsing, the intent is to build a tree of data enclosed in the tags. Thus the question on nested data structures.
-Mark
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Recursive function adds data to a hash/array
by darkphorm (Beadle) on Mar 10, 2004 at 20:10 UTC |