3 if "%OS%" == "Windows_NT" goto WinNT
\r
4 perl -x -S "%0" %1 %2 %3 %4 %5 %6 %7 %8 %9
\r
8 if NOT "%COMSPEC%" == "%SystemRoot%\system32\cmd.exe" goto endofperl
\r
9 if %errorlevel% == 9009 echo You do not have Perl in your PATH.
\r
10 if errorlevel 1 goto script_failed_so_exit_with_non_zero_val 2>nul
\r
16 # This has to work with olde perls
\r
18 my $filename = shift @ARGV;
\r
19 my $cmd = shift @ARGV;
\r
20 open FH, ">>$filename" or die "open($filename): $!";
\r
21 print FH join '|', $cmd, @ARGV;
\r
25 exit(($cmd && $cmd eq 'FAIL') ? 1 : 0);
\r