6.1. die and eval

The statement die throws an exception which can be any Perl
scalar. The statement eval { ... } catches an excpetion that was
given inside it, and after it sets the special variable $@
to be the value of the exception or undef if none was caught.