Unix-heads are used to perl scripts begining with #!/usr/bin/perl (the so-called, “shebang” notation). This is a feature I’ve always missed on Windows.
Thanks to Google’s filetype keyword, I found I a solution.
@rem = '
@echo off
\path\to\perl\perl.exe %0.cmd %*
exit /B %ERRORLEVEL%
';
print "Hello Perl World!";
The one caveat here is that you must name your file with the .cmd extension.
Update: Changed to return a proper errorlevel. Thanks, Kevin.

try exit /B%ERROR_LEVEL% instead of exit /B0 to get the return value passed back properly.