dorna1 has asked for the wisdom of the Perl Monks concerning the following question:

1) I have a perl script that will run successfully from the command line.
2) How to I run this script from within the <%init> section of a Mason file?

This doesn't work:

<%init>
system "/path/to/file/on/server/file.cgi;
</%init>

Thanks!
  • Comment on need help running perl command in Mason

Replies are listed 'Best First'.
Re: need help running perl command in Mason
by Zaxo (Archbishop) on May 21, 2006 at 23:45 UTC

    You're missing a closing quote before the semicolon.

    After Compline,
    Zaxo

Re: need help running perl command in Mason
by jesuashok (Curate) on May 22, 2006 at 02:43 UTC
    Hi

    The below lines are sufficient to run the perl script. This is applicable for all executables.

    <%init> system "/path/to/file/on/server/file.cgi" </%init>

    "Keep pouring your ideas"