CHAPTER 16Warnings and Errors

Wish as we might, warnings and errors are an inevitable part of the software development life cycle. Like any programming language, Perl generates warnings and errors and provides tools and mechanisms to help us identify problems and control what happens in the event that a warning or error is generated. Some warnings and errors can be issued at compile time—a common example is a syntax error. Others only occur during run time. Some may occur at either phase, depending on what Perl can figure out during compilation.

Errors are always fatal and always issued whenever they occur. We can carry out cleanup tasks if we supply an END block, but we cannot stop the error from terminating the program unless we place the ...

Get Pro Perl now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.