Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^6: Perl die after executing external program

by aullah (Initiate)
on Apr 29, 2011 at 13:46 UTC ( [id://901995]=note: print w/replies, xml ) Need Help??


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.

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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://901995]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (4)
As of 2024-03-29 09:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found