Your Perl script has DOS linefeeds in it! If you uploaded it to the server via FTP please upload it again in ASCII mode.