Perl Home
PERL Functions
© 2011 TutorialsPoint.COM
|
PERL exit Function
Syntax
Definition and Usage
Evaluates EXPR, exits the Perl interpreter, and returns the value as the exit value.Always runs all END{} blocks defined in the script (and imported packages) before exiting. If EXPR is omitted, then the interpreter exits with a value of 0. Should not be used to exit from a subroutine; either use eval and die or use return.
Return Value
Example
Following are the usage...
$ans = <STDIN>;
exit 0 if $ans =~ /^[Xx]/;
|
|

|
|
|