> What's the equivalent command for "return 0" in C/C++.
> This command allow you to stop your program immediately.

To end a script cleanly (letting destructors and
END blocks run) while returning a zero status:

    exit;

To end with a non zero status:

    exit n;

where n is the status. (Or set $? in one of the
destructors or END blocks.)

According to the cookbook, to end immediately,
avoiding destructor etc. clean up, use the Posix
module and call _exit, or, if Posix isn't available:

    exec "/bin/false";



Reply via email to