Abstraction solved the symptom, antirice showed how to find the problem ... i just want to show you how to indent your code:
# fill in some parameters in the template $template->param(Number => $Number); $template->param(new => $new); $template->param(story => $story); $template->param(id_no => $id_no); $template->param(message_no => $message_no); if (($check == '0') or ($check == '3') or ($check == '4')) { $template->param(tart => $tart); $template->param(ear => $ear); $template->param(mouth => $mouth); }
There is no excuse for not finding a style of code indentation and sticking to it. No excuse, especially when you present that code to others for review. It's really hard to tell which lines belong in a block if you don't use indentation. And please don't use the excuse everyone gives: "Well, i was going to go back and put indentation in later ..." ... do it now.

And if you don't know how to indent your code properly, then by all means let Perltidy decide for you. I would rather all newcomers use Perltidy to indent their code than have them just slam stuff to us. Oh and by the way ... HTML::Template::param() accepts a list, so you can say stuff like:

# fill in some parameters in the template $template->param( Number => $Number, new => $new, story => $story, id_no => $id_no, message_no => $message_no, );
Hope this helps. :)

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)

In reply to Re: Unused variable in HTML::Template results in blank screen by jeffa
in thread Unused variable in HTML::Template results in blank screen by jonnyfolk

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.