Help for this page
sub exception (;$) { my $wanted_exception = shift; ... return 1 unless defined $wanted_exception; return ref($@) && $@->isa( $wanted_exception ) };
eval { $coderef->() }; if ( exception 'IOException' ) { ... } else { ... we lived ... };