I have, for some years, used the -x option to bypass cruft at the
beginning of
perl scripts.  The long involved reason for this has no place in this
discussion, but it involves the need on certain Unix systems I used, to
invoke perl via a
shell preamble.  So I have, at the beginning of most of my perl scripts,

#!/bin/sh
... shell cruft that invokes the right version of perl on certain Unix
systems
#!perl -w
... perl script here

On Windows, there is no /bin/sh, of course, so I simply would change

c:\>ftype Perl
Perl=e:\perl\bin\perl.exe "%1" %*
c:\>ftype Perl=e:\perl\bin\perl.exe -x "%1" %*
c:\>ftype Perl
Perl=e:\perl\bin\perl.exe -x "%1" %*

The addition of -x to the perl invocation line caused the shell cruft to
be
ignored.

I just upgraded from ActivePerl 626 to ActivePerl 631, and noticed two
things, perhaps both are independent bugs, or perhaps the first caused
the second.

Observation #1:

The installation of the Active Perl 631 .msi file never completed.  It
hung forever just after installation of the html help files, after
taking that off
the screen.  However, for the most part, Active Perl 631 seems to
function.

Observation #2:

After adding the -x to the ftype Perl as described above (reinstallation
always wipes it out), attempting to run a perl script from the command
line fails:

c:\>f:\my\perl\script.pl
Can't exec /bin/sh at F:\my\perl\script.pl line 1
c:\>e:\perl\bin\perl.exe -x f:\my\perl\script.pl
c:\>ftype Perl
Perl=e:\perl\bin\perl.exe -x "%1" %*
c:\>assoc .pl
.pl=Perl

Note that it appears that running the script explicitly using perl -x,
the shell cruft is ignored (as I want), and the script runs
successfully.  However, attempting to achieve the same effect via the
file extension association, even though it appears to be set up
correctly, no longer works.

This is on Win2K Server, SP2.  Any clues???

-- 
Glenn
=====
Due to the current economic situation, the light at the
end of the tunnel will be turned off until further notice.
_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to