if (...) { die ...; } else { # continue with the happy path } #### unless ($value == $expected_value) { $errorcount++; die new Exception msg => "argh!"; } # continue with the happy path