Just scanned through your message quickly. I will look more into it later. Just picked a few things you could try in the mean time:
Change the first line of your program to read:
(assuming this is hosted on a dreamhost server?)
To make sure that you are pointing to the latest version of Perl on the server.
You could also make double sure that you have uploaded the file in ASCII format and the permissions are OK. That is you have CHMOD the script to 755 (usually required).
About the location to sendmail, you need to write the full path in where required, that is:
However, as your hosting this on a different server, you may want to check the location to [color=#CC0000]sendmail[/color] (or it's equivalent) on their server. They might be using a different program to handle their mail, or it might be in a different location.
Hope this helps. I will take a look over your script again and get back to you soon.
[color=#0000CC]Did you get the output of the error_log?[/color]