in reply to Re: Re: How do I run .pl script from Unix command line, and pass CGI variables to it?
in thread How do I run .pl script from Unix command line, and pass CGI variables to it?

Your template paths are relative:

my $template = HTML::Template->new( filename => 'nc_mainmenu.tmpl', ...

So either change those to be absolute (/path/to/nc_mainmenu.tmpl) or copy the templates to the directory you're executing the offline script from or check the webserver configuration to see if HTML_TEMPLATE_ROOT is set to something - if so, set your offline environment to have that same variable.

-derby

  • Comment on Re: Re: Re: How do I run .pl script from Unix command line, and pass CGI variables to it?
  • Download Code

Replies are listed 'Best First'.
Re: Re: Re: Re: How do I run .pl script from Unix command line, and pass CGI variables to it?
by Lori713 (Pilgrim) on Dec 15, 2003 at 16:38 UTC
    All my files (.pl's and .tmpl's) are in the same directory. Once I pass the CGI variable to it (as Abigail-II pointed me to above), the script runs and generates the HTML based on the template. So I think I have the template paths set up correctly (crossing fingers!). Thanks for your clarification!

    Lori