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):
icon -> $icon$
title -> $title$
sort -> $sort$
In my script call, I pass the following parameters:
?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 |