perl script problem

I tried to run a Perl script like this:

my \$output;
        eval {\$output = Modules->DMol3->Energy->Run(\$doc);};
       
        if (\$@) {
            # Something bad has happened, move onto the next one
            print "!!!!!!!!!!!!!!!!!!! ERROR !!!!!!!!!!!!!!!!\n";
            print \$@;

and got such error information, it seems Energy-Run(\$doc) didn't run:

Application finished with no output file water (8).outmol in DMol3.Energy (function/property "Run") at -e line 86.
Processing frame 11, angle is 90 and distance is 1.1
!!!!!!!!!!!!!!!!!!! ERROR !!!!!!!!!!!!!!!!

Task completed with failure.

Anybody met this before? Thanks!