Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: doubts of a perl beginner in G_EVAL(perlEmbed)

by McDarren (Abbot)
on Dec 26, 2005 at 08:40 UTC ( [id://519084]=note: print w/replies, xml ) Need Help??


in reply to doubts of a perl beginner in G_EVAL(perlEmbed)

hmm, from perldoc -f exit
Don't use "exit" to abort a subroutine if there's any chance that someone might want to trap whatever error happened. Use "die" instead, which can be trapped by an "eval".

That doesn't sound too promising....

Do you actually need to catch the exit 0, or do you just need to know whether it terminated normally. AFAIK, a zero exit status generally means sucess, whereas anything else means that something went wrong. So perhaps you could just test the exit status of the Perl script, no?

Replies are listed 'Best First'.
Re^2: doubts of a perl beginner in G_EVAL(perlEmbed)
by jithoosin (Scribe) on Dec 26, 2005 at 09:07 UTC
    After reading the first reply i feel i must ask my friend to change the perl code ie exit(0) must be changed to "die".Thanks for the suggestion from the perl doc.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (5)
As of 2024-04-25 08:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found