in reply to Calling Perl from HTML

Well, it's not a message generated by your program, as your only die() starts with "Cannot open". Which leaves the funky (and incorrect) she-bang line. I guess you want to start with:
#!/usr/bin/perl -w use strict;
(Note: no ^M).

Abigail