Perl Programming/Keywords/eval

The eval keyword
There are two uses of this keyword. The first form is the so-called "string eval" and executes the EXPRESSION as it were a Perl program. The second form, the code within the BLOCK is parsed once together with the code surrounding the eval itself, and executed within the current Perl program context. This form is typically used to trap exceptions more efficiently than the first, and also checking the code within BLOCK during compile time.