- Dec
- 238
- 2
(Still running TCC 15.01.52 x64 under Windows 7)
I know I've brought this up already but maybe I didn't ask the right questions...still baffled. If I associate .pl (the extension for Perl scripts) with perl.exe, simply typing scriptname.pl at the command prompt -- if it's cmd.exe -- launches Perl, runs the script, and passes along any command-line arguments.
As we've discussed before, this only generates an error under TCC. Instead, you have to type perl scriptname [arguments]. That is: start by launching perl itself.
That by itself is no particular hardship. But if the Perl script returns exit codes, it's impossible to capture them via some other process, the reason being that Perl.exe itself typically returns exit code 0 when there's a successful execution of the script. Any non-zero exit codes the script returns are never "visible".
If the script is launched like this:
cmd.exe /c scriptname [arguments]
Then its exit codes can be captured.
But any attempt to associate something with ".pl" -- perl.exe, start perl.exe, start /pgm perl.exe, cmd.exe /c, cmd.exe /c perl.exe -- etc., etc. -- all fail, with Perl printing the error message Error (SYS): Invalid class string.
What is making the difference here? Is it some Secret Sauce that cmd.exe has, enabling it to launch these kinds of scripts without error?
(It's 32-bit ActivePerl running on a 64-bit machine. 64-bit Perl does not seem terribly stable to me and does not have a sterling reputation.)
I know I've brought this up already but maybe I didn't ask the right questions...still baffled. If I associate .pl (the extension for Perl scripts) with perl.exe, simply typing scriptname.pl at the command prompt -- if it's cmd.exe -- launches Perl, runs the script, and passes along any command-line arguments.
As we've discussed before, this only generates an error under TCC. Instead, you have to type perl scriptname [arguments]. That is: start by launching perl itself.
That by itself is no particular hardship. But if the Perl script returns exit codes, it's impossible to capture them via some other process, the reason being that Perl.exe itself typically returns exit code 0 when there's a successful execution of the script. Any non-zero exit codes the script returns are never "visible".
If the script is launched like this:
cmd.exe /c scriptname [arguments]
Then its exit codes can be captured.
But any attempt to associate something with ".pl" -- perl.exe, start perl.exe, start /pgm perl.exe, cmd.exe /c, cmd.exe /c perl.exe -- etc., etc. -- all fail, with Perl printing the error message Error (SYS): Invalid class string.
What is making the difference here? Is it some Secret Sauce that cmd.exe has, enabling it to launch these kinds of scripts without error?
(It's 32-bit ActivePerl running on a 64-bit machine. 64-bit Perl does not seem terribly stable to me and does not have a sterling reputation.)