> My question is: > > Do the BAT scripts contain a copy of the Perl script to be backward- > compatible with some old version of cmd.exe ?
Yes, the comspec environment variable points to the command processor to use, and commands like CALL will honor this value. In the old non-NT kernel versions of Windows (95/98/ME and older), it pointed to COMMAND.COM, but with the NT kernels (NT/2000/XP/Vista/7) it points to CMD.EXE. This script indeed looks like it was trying to determine which form of the perl command line to use to handle different O/S levels. The form of CALL you want to use (@CALL perl.exe %~dpn0.pl*) will work only on the most current versions of Windows, and it may even work on any NT kernel (I don't remember too much pre-XP anymore), but it definitely won't work with the non-NT versions. So if your environment still has Windows 95/98/ME/NT/2000 machines, then you'll need to leave the old version of the script in place. But if your environment only has nothing older than XP, changing this to your generic CALL should work. Brian asked "...isn't the call command intended for executing one batch file from another...?" Perhaps it was at one time, but it invokes any program that Windows can run, and it does so in a blocking fashion - it waits until the called program is done before returning. And you said CALL would "use a perl.exe installed in the same directory as the BAT script". Yes, that's the first place it looks. But if it's not there, it'll also check the Windows directories (\Windows and \Windows\System32) and the directories in the PATH environment variable. It runs the first file it finds that matches. HTH, TanMan _______________________________________________ ActivePerl mailing list ActivePerl@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs