At 04:34 PM 11/21/2005 +0900, [EMAIL PROTECTED] wrote:
>The code,push @path_ext, qw(.com .exe .bat);
>in Which.pm ...
>This case is so special!
>C:\>pwhich ppm
>C:\Perl\bin\ppm.BAT
>C:\>pwhich -a ppm
>C:\Perl\bin\ppm.BAT

I was afraid it would do that.  The Perl 'which' seems to only see win32
executables.  The "real" which program obeys bash executable semantics where
a command can have no extension.  It bases it's choice on whether a file has
the execute bit set.  Cygwin checks for a shebang line as well as the
extension and contents to see if a file should be considered executable.  I
guess that would overlook a zero byte file as well.  Oh well.  It might be
worth it to look into the find command to emulate the search that perl -S does.

[ATTIC:/c]$ which ppm
/c/perl/bin/ppm
[ATTIC:/c]$ which ppm.bat
/c/perl/bin/ppm.bat



--
REMEMBER THE WORLD TRADE CENTER         ---=< WTC 911 >=--
"...ne cede malis"

00000100

_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to