My bad. Here's the long version.
I have not seen a implementation of $input->param(<red>$1</red>). I assumed it needed to be in a for loop.
I placed the code you supplied into my script (sans for loop) but see nothing happening in the final displayed result (tokens are displayed).
More specifically:
In the template file (which is a html page) there are the following tokens which are wrapped with a variable character that is defined within the script as '$' but can be overridden by passing a different value in the script call (&wrapper=somevalue):
In my script call, I pass the following parameters:icon -> $icon$ title -> $title$ sort -> $sort$
?file=whatsnew.dat &for=Soaring &in=Area &max=10 &order=desc &sort=Date &icon=address.gif &title=Testing
Of the parameters passed, three should perform replacements. What I am getting back in $page_template after s&r is:
icon -> $icon$ title -> $title$ sort -> $sort$
...as if the search did not find matches. Since this search involves a hash, I am wondering if that is what it is looking for: CGI->HASH(...) vs the value of $input->param(...). My understanding is that the w+ (lookahead) should take care of this.
No errors are displayed.
======================
Sean Shrum
http://www.shrum.net
In reply to Re: Re: Re: Re: Do regex using hash keys to wrapped template tokens
by S_Shrum
in thread Do regex using hash keys to wrapped template tokens
by S_Shrum
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |