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

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.

Replies are listed 'Best First'.
Re: I/O here
by BUU (Prior) on Mar 10, 2004 at 22:51 UTC
    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