given, that STDERR is not redirected to /dev/null. If so, you may still open a file inside of the BEGIN block and print into that file. The output should give you more that enough info about the actual Perl running the CGI under majordomo.

Not knowing how your CGI is actually started, please consider the possibility, that the first line (the "#!/usr/...") may not be evaluated at all if there is a wrapper CGI that calls your program with "system('/some/path/to/some/perl', 'scriptname');".