CLIENT: while (!exitflag) { eval { # Various things that might throw exceptions if (blah blah) { next CLIENT; } }; if ($@) { # Exception handling } }