try:
#!/bin/sh
echo "Content-Type: text/plain"
echo
which perl
perl -V
(You can still save it with the .pl extension if you don't feel like messing with your config)
If that doesn't work, CGI scripts are just broken, because /bin/sh should never fail.