SPUG:running personal perl script through ActiveState perl from cygwin

Michael R. Wolf MichaelRunningWolf at att.net
Sun Jun 1 03:16:33 CDT 2003


I guess I'm sitting in the stupid gas, I can't see my way out from
here. I just want to run a perl script on ActiveState perl while in a
cygwin bash.

If it's a shebang line, I've missed the right one.  I've failed by
trying these:
#! perl -w
#! /usr/bin/perl -w
#! /cygdrive/c/Perl/bin/perl -w
#! C:/Perl/bin/perl -w
#!
and
no shebang line.

I think it's a problem with the difference between how NT sees the
file system and how cygwin sees the filesystem. I'm betting that
cygwin finds the script in the Unix-like filesystem, but perl.exe sees
the filesystem as NT-like. Just a guess, but if that guess is correct,
is there a shebang line that can bridge them, or do I need some other
kinda' magic?


bash-2.05b$ mount
C:\cygwin\usr\X11R6\lib\X11\fonts on /usr/X11R6/lib/X11/fonts type system (binmode)
C:\cygwin\bin on /usr/bin type system (binmode)
C:\cygwin\lib on /usr/lib type system (binmode)
C:\cygwin on / type system (binmode)
c: on /cygdrive/c type user (binmode,noumount)
m: on /cygdrive/m type user (binmode,noumount)
r: on /cygdrive/r type user (binmode,noumount)
bash-2.05b$ echo $PATH
/home/toshiba/bin:/usr/bin:/usr/local/bin:/cygdrive/c/emacs-21.2/bin:/cygdrive/c/Perl/bin:/cygdrive/c/WINNT/system32:/cygdrive/c/WINNT:/cygdrive/c/WINNT/System32/Wbem
bash-2.05b$ pwd
/home/toshiba/bin
bash-2.05b$ ls mrw_ping.pl
mrw_ping.pl
bash-2.05b$ which mrw_ping.pl
/home/toshiba/bin/mrw_ping.pl
bash-2.05b$ which perl
/cygdrive/c/Perl/bin/perl
bash-2.05b$ ls -l $(which perl)
-rwxrwxrwx    1 Administ SYSTEM      20480 Dec  1 23:16 /cygdrive/c/Perl/bin/perl
bash-2.05b$ mrw_ping.pl
Can't open perl script "/home/toshiba/bin/mrw_ping.pl": No such file or directory
bash-2.05b$ 




Whadda' ya mean, "No such file"?

Who "Can't open perl script..."?
  cygwin
  perl.exe
  NT
  she-bang loader


-- 
Michael R. Wolf
    All mammals learn by playing!
        MichaelRunningWolf at att.net




More information about the spug-list mailing list