Returning Error Code
Is it possible to return an error code from a开发者_StackOverflow perl script?
I am writing perl script which takes a parameter KEY,
Now to cover up negative scenario, like file open failure Key already exist etc,
I want to return different error code, like enum { FILE_OPEN_FAILED, DUPLICATE_KEY }
This perl script is called from a C function and depending on the error code I need to generate ALARMS.
Please Help...
Thanks, V-Anu
exit
, die
and END
blocks can set the exit code.
精彩评论