in reply to Executable perl programs

What kind op OS do you run? On my Windows XP Pro and ActiveState Perl 5.8.8, these perl programs start with the usual (but on Windows not really needed) #!/usr/bin/perl -w

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

Replies are listed 'Best First'.
Re^2: Executable perl programs
by j1n3l0 (Friar) on Mar 23, 2008 at 19:49 UTC
    Sorry, this is on a Linux machine. Although its the same on my Mac OS X and on Windows XP the cpan.bat file starts like this:

    @rem = '--*-Perl-*-- @echo off if "%OS%" == "Windows_NT" goto WinNT perl -x -S "%0" %1 %2 %3 %4 %5 %6 %7 %8 %9 goto endofperl :WinNT 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 '; #!perl #line 15 eval 'exec C:\strawberry\perl\bin\perl.exe -S $0 ${1+"$@"}' if $running_under_some_shell;


    Smoothie, smoothie, hundre prosent naturlig!