http://www.perlmonks.org?node_id=1055616


in reply to Perl Command Prompt while executing perl script through cgi

Hi,

Why are you calling a Perl script from a perl script?

Ectract the workings of the second script and put them into the CGI script as a subroutine.

J.C.

  • Comment on Re: Perl Command Prompt while executing perl script through cgi

Replies are listed 'Best First'.
Re^2: Perl Command Prompt while executing perl script through cgi
by TJPride (Pilgrim) on Sep 25, 2013 at 20:02 UTC
    Because the inner process could theoretically die, and you don't want the outer process to die too, and/or you don't want to worry about spill-over from one instance of the inner process to the next (even if it's just memory usage). I have one client that does long, complicated data imports, and I use a master script to call scripts that process individual data sets. So it's not necessarily a bad approach.