eval { die "screaming" }; if( $@=~ /screaming/) { print "stop screaming\n"; } print "happily going on\n";