in reply to Re^5: Perl die after executing external program
in thread Perl die after executing external program

Yes, I'm sure because I can see the output on terminal while executing the code with debugging ON. But problem is STDOUT/STDERR is not returning any value except 0.
  • Comment on Re^6: Perl die after executing external program

Replies are listed 'Best First'.
Re^7: Perl die after executing external program
by mr_mischief (Monsignor) on Apr 29, 2011 at 17:26 UTC

    STDOUT or STDERR should neither one return a numeric 0. They should only return a string (although the string could be '0' if that's what the program you executed wrote to one of those handles).

    If you're getting a numeric 0, you're getting it from a system call or a pipe. In scalar context the backticks will return either a string or undef. perlop says so. In a list context, it will be a list of lines or an empty list. Again, perlop says so.