exit

exit

exit EXPR

exit

Evaluates EXPR and exits immediately with that value. Example:

$ans = <STDIN>;
exit 0 if $ans =~ /^[Xx]/;

See also die- If EXPR is omitted, exits with 0 status. The only universally recognized values for EXPR are 0 for success and 1 for error; other values are subject to interpretation depending on the environment in which the Perl program is running. For example, exiting 69 (EX_UNAVAILABLE) from a sendmail incoming-mail filter will cause the mailer to return the item undelivered, but that's not true everywhere.

Don't use 登录查看完整内容