411 REFERENCE · Wikibooks
Perl Programming/Keywords/exit
Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.
Perl exists exp Keywords
The exit keyword
exit finishes the execution of the program after valuating EXPRESSION. It returns with this value.
Although exists can be called on arrays also, its behaviour strongly depends to the use of delete on arrays, having a much less clear behaviour.
Syntax
exit EXPRESSION
exit
Examples
print "Exists\n" if exists $hash{$key};
print "Defined\n" if defined $hash{$key};
print "True\n" if $hash{$key};
See also
die
Perl exists exp Keywords