## try some code eval { do { stuff->that, might( cause => an exception() ) } }; ## catch any errors warn "An explantion: ", $@->message if UNIVERSAL::can($@, 'can'); warn "Stuff went wrong: $@" if $@;