SPUG:running personal perl script through ActiveState perl
from cygwin
Creede Lambard
creede at penguinsinthenight.com
Sun Jun 1 12:06:42 CDT 2003
Have you tried running
which perl
in bash to see whether bash knows about perl and where it thinks the
interpreter might be?
I was thinking that the shebang line is a Unix artifact that has no
meaning in NT Perl -- at least I've been able to lead off Perl scripts
with "#!/usr/bin/perl -w" on NT as long as I can remember with no ill
effects -- but that's running them from the NT command line, not bash,
and I have no idea what the differences between NT bash and Unix bash
are. It's been a long time since I've used cygwin.
On Sun, 2003-06-01 at 01:16, Michael R. Wolf wrote:
> 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
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://mail.pm.org/pipermail/spug-list/attachments/20030601/801bb6ff/attachment.bin
More information about the spug-list
mailing list