A few things off the top of my head, to add to Chmrr's advice:

First and foremost, you haven't actually told us what is wrong. It's not clear what you mean when you say you can't get the template to work right. Does the script not produce any output? Do you get a server error? Have you checked your server logs or tested the script on the command line?

When you open the file, you should make sure that the open succeeded. Here's how to find out what went wrong when the file can't be opened: open(SEE, "../$value") or die "Can't open '../$value': $!";

Lastly, it may be the case that, when the script is run by the web server, the current working directory is not what you expect. This is a quirk of some web servers. You can try using absolute paths in your script, to see if that fixes the problem.

Hope that helps!


In reply to Re: Syntax and code debugging by chipmunk
in thread Syntax and code debugging by Anonymous Monk

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.