"Perl for Perl Newbies" - Part 4Exceptions

6. Exceptions

Exceptions are a mechanism to raise an error in a program which will propagate to outside blocks, until it is caught by an explicit catching block, or it terminates the program. It is a convenient way to manage errors.

In Perl, there is a statement that throws an exception, and one that catches it. The exception may escape out of function calls as well.


Written by Shlomi Fish