in reply to Problems with perl script calling perl scripts

Well I dont see anything that looks out of place. So my guess is that there is something wrong with the scripts you are calling. For debugging I would suggest putting the command line strings into another variable, then printing it out, like this:
$command = "perl z:\\scripts\\baseball\\stats1.pl $date"; print "$command\n"; $message .= `$command`;
Maybe the command is not actually what you expect. Also you can execute the command that is printed for yourself, just to make absolutely sure it is working as expected.

Another remote possiblitly is that maybe some environment variables that are needed are not getting set in your script? Maybe use should use the absolute path to your perl executable and not just call 'perl z:...' But I am totally guessing.

Replies are listed 'Best First'.
RE: RE: Problems with perl script calling perl scripts
by ergowolf (Monk) on Apr 29, 2000 at 17:04 UTC
    I would put the whole thing in one script and avoid the trouble of getting the scripts to talk to one another. If the script is still unmanageable you can add subroutines and perl modules. You don't show the other scripts, but I am willing to bet they could be small subroutines. My philosophy is to keep it as simple as possible and achieve the objective.
      Just finished doing this. Oddly enuf, I still have the exact same problem. The all-in-one script dies in the same part that the it did when separated.
      When I commented out all the stuff prior to the part where it dies, it ran fine. Arrgh. This should be an interesting weekend.