Thanks folks - I knew it had to be something simple, but sadly it hasn't totally sorted it.

I'm running on a Windows NT server. Where I have the HTML and perl is the normal location for this type of stuff and other scripts there run fine (from both form and hyperlink clicking).

I've now changed the 'runindex.pl' script to this:

#!/usr/local/bin/perl -w use strict; use CGI qw(:standard); use CGI::Carp qw/fatalsToBrowser/; print "Content-Type:text/html\n"; print "\n"; print "<HTML>\n"; print "<Head></Head>"; print "<body>"; my $program="index.bat"; #$status= system ($program) ==0 or die "$program exited funny: $?"; print "</body>"; print "</HTML>";
I can't 'use warnings' it's not in my Perl installation.

I'm getting this error now

Content-type: text/html Software error: index.bat exited funny: 256 at E:\Perlcgi\pipeline\runindex.pl line 14 +.
and 'index.bat' isn't running (because the scripts it should run aren't updating the files they should update!).

I can still execute 'runindex.pl' from the dos command line on the server though, so I'm dead confused.

I've tried changing the HTML so that the script runs from a form submission, but I get exactly the same results.

Would it be easier for me to execute the perl scripts that index.bat is trying to run, within 'runindex.pl'? (Like I know how to do that - not!) This is what index.bat does:

todayindex.pl agentview2.pl serviceview1.pl salesview1.pl maview1.pl hoview1.pl caview1.pl bmview1.pl allindex.pl beneview1.pl charityview1.pl facview1.pl insuranceview1.pl mortview1.pl regulationview1.pl salesadvview1.pl savview1.pl systemsview1.pl trainview1.pl previndex.pl
i.e runs a whole bunch of other perl scripts! Any more ideas? I've looked up the error code - it apparenlty can't fork the subprocesses. Why would that be?

In reply to Re^2: Am I missing something major here (system/exec)? by kjg
in thread Am I missing something major here (system/exec)? by kjg

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.