in reply to Can I step into a program called with `backticks`?
You probably just need something like Capture::Tiny so that you can easily capture not only STDOUT but also STDERR and the exit code:
use Capture::Tiny 'capture'; my ($stdout, $stderr, @result) = capture { system( 'perl', '/full/path/to/program.pl', '-option' ) }; print "STDOUT received: <<$stdout>>\n"; print "STDERR received: <<$stderr>>\n"; print "Return value of system call was: <<@result>>\n";
The other issue is the question of why it matters whether program.pl is called from another program, or from the command line. Run it from the command line instead and maybe you'll see the issue there too.
Dave
|
|---|