@echo off rem: To use it, you can provide the name of Perl to check as a command arg, rem: as in rem testperl perl_ set tperl=%1 if "%tperl%" == "" set tperl=perl echo ==================================== echo Testing %tperl%... Getting version... echo ==================================== rem Errorlevel is not set if the program is not found?! %tperl% -e "exit 1" if errorlevel 1 goto mayhave goto noperl :mayhave %tperl% -v if errorlevel 1 goto noperl goto haveperl :noperl echo Cannot start %tperl% !!! Please check that you have %tperl% on PATH, echo and (if you do not use perl_.exe) that perl.dll is on LIBPATH. echo ... Keep in mind that changes to config.sys DO NOT take effect echo until reboot, and LIBPATH can be changed ONLY from config.sys. input "Press " %%i exit 1 :haveperl perl -S -x testperl.cmd exit 0 #! perl sub get_help; $| = 1; print <: "; <>; print <); close SH or warn "Errors closing pipe from shell: \$!='$!', \$?=$?\n"; print "I could find your shell, its version is '$v'\n" if $v; $no_sh++ unless $v; } if ($no_sh) { print <); close SH or warn "Errors closing pipe from shell: \$!='$!', \$?=$?\n"; print <: "; <>; print <: "; <>; $prefix = 'f:/perllib/'; if (exists $ENV{PERLLIB_PREFIX}) { @parts = split /[ ;]/, $ENV{PERLLIB_PREFIX}, 2; print < '$Config{$_}'\n"; } print <: "; <>; eval "use Net::Config; 1" or $no_netconfig++; if ($no_netconfig) { print <: "; <>; sub get_help { print <