in reply to Path problems using HTML::Template

Not sure why you don't have all .cgi files in your cgi-bin directory, but that is another matter. You might try to tighten up your anchors if you are going to assume that they are relative, like so:
TOPNAV.TMPL ... <li><a href="THENAMEOFTHESCRIPTIWOUDLLIKETORUN.pl?p=6">LINKS</a></li>

Celebrate Intellectual Diversity