Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: perl program return error code to ksh

by Corion (Patriarch)
on Jun 24, 2014 at 11:20 UTC ( [id://1091038]=note: print w/replies, xml ) Need Help??


in reply to perl program return error code to ksh

die sets the exit code to a nonzero value, which you should find in $? in Perl and in ksh. Most likely you are calling perl with an intermediate shell, or maybe within a pipe construct:

myscript | grep errors

Pipe constructs tend to lose the intermediate exit codes.

If you can show the relevant part of the shell script where you call Perl and where you check for the error, maybe a solution will become apparent.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2024-04-23 23:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found