CGI:Carp (qw:fatalsToBrowser); to your script. This will show a more Perl specific error (along with line number(s)) that you can use to track down the error. If all else fails, try running it from the command line and see what errors spit out. This is assuming you are running use strict; which you should always do.
If you check your error log, hopefully you will see an error message and a line number - but not necessarily.
Kaled.