in reply to Re: Printing a dollar sign..
in thread Printing a dollar sign..

I figured it out. You guys were right. :o) I did have an eval in there. I had it do a search for variables and switch them out of the HTML:
$_template_code =~ s/(\$[a-zA-Z0-9\{\'\}_]+)/ eval($1) /ge; # Switch a +ll the $variables... (This is the WHOLE html document, $_page_content + is in the main table for the main content. This will switch any vari +ables with the data.
I fixed it by adding this to it:
$_template_code =~ s/(\$[a-zA-Z0-9\{\'\}_]+)/ eval($1) /ge if $1; # Sw +itch all the $variables...
adding the 'if $1' fixed it because the variable is undefined so it won't switch it.

Thank you guys for pointing me in the write direction :)
thx,
Richard

Replies are listed 'Best First'.
Re^3: Printing a dollar sign..
by tachyon (Chancellor) on Aug 27, 2004 at 05:21 UTC

    Consider HTML::Template or at least using its syntax. Using $VAR in templates and eval is not exactly best practice.

    cheers

    tachyon