http://www.perlmonks.org?node_id=468952


in reply to /usr/bin/perl -w?

Check you shebang(#!) line. You probably have ^M or some other unprintable character there.