in reply to passing user form input value to %placeholder%

Just out of curiosity ... why are you doing this rather than using an existing templating mechanism, such as HTML::Template or Template?

If it's because you're using XML, then I would suggest using XML::Twig to parse it, and using its XPath-like language to find attributes with %'s in it, and then you can update those. Or I'd use one of the above template modules to create the XML from the template.

  • Comment on Re: passing user form input value to %placeholder%

Replies are listed 'Best First'.
Re^2: passing user form input value to %placeholder%
by rick (Novice) on Apr 25, 2006 at 16:53 UTC
    This is a Perl script that allows web page creation. I needed to use Perl because its flexibility for administrative purposes. I took a long look at what I was actually trying to do and changed:

    $text =~ s!^(\015|\012)*!!s;

    to this:

        $text =~ s!^(%%(.*?)%%)*!!s;

    Thank you for your response. I will definately keep your suggestions in mind for my next project.