exit(EXPR) exit EXPR Evaluates EXPR and exits immediately with that value. Example: $ans = <STDIN>; exit 0 if $ans =~ /^[Xx]/; If EXPR is omitted, exits with 0 status.