title: How do I run a Perl script from within a Perl script?
body: <p>I've got a Perl script that needs to execute another Perl script. This second script can be executed directly on the command line, but I need to execute it from within my first program. I'll need to pass it a few parameters that would normally be passed in when it's run standalone (the first script runs periodically, and executes the second script under a certain set of system conditions).</p>
  
  <p>Preliminary Google searches suggest using backticks or a system() call. Are there any other ways to run it? (I'm guessing yes, since it's Perl we're talking about :P ) Which method is preferred if I need to capture output from the invoked program (and, if possible, pipe that output as it executes to stdout as though the second program were invoked directly)?</p>
  
  <p>(Edit: oh, <strong>now</strong> SO suggests some related questions. <a href="https://stackoverflow.com/questions/109124/run-external-process-from-perl-capture-stderr-stdout-and-the-process-exit-code">This one</a> is close, but not exactly the same as what I'm asking. The second program will likely take an hour or more to run (lots of I/O), so I'm not sure a one-off invocation is the right fit for this.)</p>