Results 1 to 3 of 3

Thread: How to run Perl script from a cgi script??

  1. #1
    Join Date
    Mar 2003

    Question How to run Perl script from a cgi script??

    I have a cgi script that is simply a Perl script, but I have mapped my cgi script to use Perl.exe. I have this so that I can run the cgi script from my server. My cgi script has calls to other Perl scripts that I've written using the 'system' command. And the Perl scripts are on a different drive than where my cgi script resides. When the cgi script runs I get a bunch of error messages with the calls of the other Perl scripts that says the program 'is not recognized as an internal or external command, operable program or batch file.'

    How can I get the cgi script to run the other scripts? (The cgi script is run from the server when a user selects 'submit')

  2. #2
    Join Date
    Nov 2002
    NY, USA
    Is this being run on a Win32 machine? If so then it isn't enough to just put the file name as the execute command. It would have to be more like
    system 'c:\\perl\\bin\\perl.exe d:\\script.pl';

  3. #3
    Join Date
    Mar 2003
    It's on a Windows 2000 machine, but I have my Perl scripts mapped to the C:\Perl\bin directory. When I run my Perl scripts I don't have to put the ....perl.exe in front. Maybe it's just that within the perl script I'm also making calls to run a different application. I'm not sure. The cgi script has calls to some batch files (files that end in '.bat') and it doesn't recognize that either. Have any ideas?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center

Recent Articles