Perl Script Error Handling.

I'm having some trouble with Forcite->Dynamics failing due to things like energy deviaiton too large, or unpysical integration. Which is fine, but it kills the whole script. I've had a search about for Perl Error handling tequniques, such as:

unless (Modules->Forcite->Dynamics->Run(\\\$doc)) {print "Fail"};

print "Still going";

and

if (Modules->Forcite->Dynamics->Run(\\\$doc)) {

print "Completed okay";

} else {print "Dynamics Failed"};

print "Still going";

Which should treat the dynamics run as a query, but it still kills the whole script.

Is there a why of returning back to the script after a failed Dynamics run to allow the program to recover and continue?

Very grateful for any input.

Steve