I've tried something similar in order to confirm what was being seen with the the error handling scripts as I wasn't certain that they would be being invoked in the same way as general CGI, to verify the user it was running as and that it was running each time -- each time I run the datetest.cgi bourne shell script it displays the date and writes it to a file (as the user it's supposed to be running as).
As for the path to perl,
(bin)% /WWW/bin/perl -ver
This is perl, v5.6.1 built for sun4-solaris
Copyright 1987-2001...
that, plus that it runs the scripts when executed on the command line, makes me pretty sure it's perl :)
We have a web-server specific perl installation which is only used by the webserver.