Believe me, I know where you're coming from. Having shell access on the offending system does come in handy in these situations.
But, there are other ways to track down bugs in CGI scripts. What I've done in the past is wrap the whole darn script up in an giant eval block, like so:
>eval {
# all my code goes here
};
if ($@) {
print "Content-Type: text/html\n\n";
print "Got an error: $@";
}
And as soon as it craps out, I get a nice little error message in my browser window.