Exercise: Exception Handling

Work through an exercise to do error handling using exceptions in Perl.

We'll cover the following...

Problem statement

We've given a code snippet below in which error reporting is done within if-else blocks. Modify this code so that the error reporting is done through Perl's exception handling mechanism instead.

Access this course and 1400+ top-rated courses and projects.