develooper Front page | perl.beginners | Postings from February 2002

Re:pl2bat issue

Thread Next
From:
Jorge Goncalvez
Date:
February 13, 2002 01:35
Subject:
Re:pl2bat issue
Message ID:
200202130934.KAA01488@cabs40.col.bsf.alcatel.fr

Hi, I tried to make an .bat of a .pl file thanks to pl2bat to execute it from 
both Windows NT and Win 9x.
But when i double clicked it on NT it works but on Win9x it fails and i have the 
following:
Command or filename incorrect
In the header and the finish  of my file i have:

@rem = '--*-Perl-*--
@echo off
if "%OS%" == "Windows_NT" goto WinNT
c:\\OXE\\Active_perl\\bin\\perl -x -S "%0" %1 %2 %3 %4 %5 %6 %7 %8 %9
goto endofperl
:WinNT
c:\\OXE\\Active_perl\\bin\\perl -x -S "%0" %*
if NOT "%COMSPEC%" == "%SystemRoot%\system32\cmd.exe" goto endofperl
if %errorlevel% == 9009 echo You do not have Perl in your PATH.
if errorlevel 1 goto script_failed_so_exit_with_non_zero_val 2>nul
goto endofperl
@rem ';

#!/usr/local/bin/perl -w
........

__END__
:endofperl

thanks




Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About