There's another case not covered: exec. Something like exec("/bin/true") will effectively exit a script without triggering any END blocks, etc.
Illustration:
#!/usr/bin/env perl use 5.010; use strict; use warnings; BEGIN { *CORE::GLOBAL::exit = sub { die("exit called") } } END { say "END block"; } do { exec "/bin/true" }; # Assuming a Unix-like system here say "got here";
In reply to Re^6: Program unexpectedly terminates
by tobyink
in thread Program unexpectedly terminates
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |