in reply to Re: Recursive function adds data to a hash/array
in thread UPDATED: Recursive function adds data to a hash/array

I am puzzled as to how you think the function would be calling itself. I can't see it in the code.
($newvalue, @subgroup)=sub_pick_group_seg ($newvalue);
So while it is indeed calling itself, it would be nice if darkphorm explained in plain english what was trying to be accomplished. Better yet, included a small example of input and desired output. I can't make heads or tails of it.
L~R

Replies are listed 'Best First'.
I/O here
by darkphorm (Beadle) on Mar 10, 2004 at 20:04 UTC
    The input is an HTML file:

    <HTML> <HEAD> <TITLE><$=TITLE></TITLE> </HEAD> <BODY> This is a test of variable substition.<br> <br> Date=<$=DATE><br> <br> <table border=1> <tr> <th>firstname</th><th>lastname</th><th>Accounts</th> <tr> <@=USERDATA> <tr> <td><$=FIRSTNAME></td> <td><$=LASTNAME></td> <td> <table> <tr> <th>Account ID</th> <th>type</th> <th>Balance</th> </tr> <@=ACCOUNTDATA> <tr> <td><$=ACCID></td> <td><$=ACCTYPE></td> <td><$=ACCBALANCE></td> </tr> </@=ACCOUNTDATA> </table> </td> <tr> </@=USERDATA> </table> </BODY>


    The concept is to make the manipulation of the custom tags easy, so that the HTML-devs can do their thing with a page, and data can be easily inserted with hash variables.
      Since no one else has mentioned this: Why reinvent the bloody wheel? Theres dozens of various templating modules that already do this sort of thing. They're simple, easy and very well tested.

      HTML::Template
      Mason
      Template::Toolkit
Re: Re: Re: Recursive function adds data to a hash/array
by Happy-the-monk (Canon) on Mar 10, 2004 at 19:16 UTC

    thank you Limbic~Region, I must have been blind not to see that line... hmm.

    Cheers, Sören