Hmmm...an odd thing is happening. Here is the code:

if ( $input->param('debug') ) { print "<P>...replacing parameter token +s in final report"; } my $w = $input->param('wrapper'); for ( keys %input ) { if ( $input->param('debug') ) { print "<P>...replacing token: $_"; + } $page_template =~ s/\Q$w$_$w/$input->param($_)/eg; $page_template =~ s/\Q${w}lc_\L$_\E$w/$input->param(lc)/eg; $page_template =~ s/\Q${w}uc_\U$_\E$w/$input->param(uc)/eg; }

I see the message on screen of "...replacing parameter tokens in final report" but I am not seeing any "...replacing token: __". Is the FOR loop set up correctly? At first I thought I was losing the contents of the hash but I know there are values in $input as the first 'debug' line is working.

For that matter, I have tried everyones suggestions (thans to all for their time) with no luck meaning the tokens are not replaced in the final template. I'm stumped. I am doing replacements to record and table templates just fine. $page_template is the final to-be-displayed-to-the-user template.

TIA.

======================
Sean Shrum
http://www.shrum.net


In reply to 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

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.