This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: Why can't I run perl scripts after cd to /_/d i.e. d:


> -----Original Message-----
> From: Chris Faylor [mailto:cgf@cygnus.com]
> Sent: Wednesday, July 05, 2000 9:24 PM
> To: cygwin@sourceware.cygnus.com
> Subject: Re: Why can't I run perl scripts after cd to /_/d i.e. d:
> 
> 
> It certainly sounds like this is not a cygwin version of perl 
> and so it
> does not understand cygwin paths.
> 
> cgf

Indeed it is not a cygwin version of perl.  But I do not understand what you
mean
"it does not understand cygwin paths".  The path it cannot seem to find is
the path
to the executable, on the first line of the script, i.e. #/usr/bin/perl
Is this what you mean?  But why can't it find that?

One of the things I like about Perl is that the identical scripts can be run
on both NT and Unix, provided I have a copy of the the perl program in the
same place, i.e.
/usr/bin/perl

Are you saying that if I am in a cygwin bash shell, and happen to be on a
drive other than c:, my perl scripts will not work?  If this is really true
I hope there
is a workaround.  Otherwise this is a showstopper problem for me.
Or am I misunderstanding?

The following shows that even running in a DOS box and in D: the perl script
works correctly, provided I have associated the extension .pl with the Perl
program.

C:\usr\home\mybin>cat testperl.pl
#!/usr/bin/perl
print "hello from testperl\n";

C:\usr\home\mybin>assoc .pl
.pl=Perl

C:\usr\home\mybin>d:

D:\>testperl.pl
hello from testperl

Thanks,
Steve

> On Wed, Jul 05, 2000 at 09:18:58PM -0400, Tolkin, Steve wrote:
> >The following shows that when I am on d: I cannot run a perl 
> script.  
> >I get the error message "No such file or directory".  It 
> seems like it
> >cannot find the perl interpreter executable.
> >But running a similar bash script does work.
> >I changed the value of cygdrive to /_ at one point using 
> mount, and it is
> >remembered in my registry with 
> >name: cygdrive prefix
> >data: "/_".  
> >Is this (part of) the problem.
> >I changed from /cygdrive because that was so tedious to type 
> each time I
> >need to work on another hard disk.
> >
> >1014/_/d/_mysetup> type bash
> >bash is /usr/bin/bash
> >1015/_/d/_mysetup> echo > /usr/home/mybin/testbash
> >1016/_/d/_mysetup> cat > /usr/home/mybin/testbash
> >#!/usr/bin/bash
> >echo hello from testbash
> >1017/_/d/_mysetup> /usr/home/mybin/testbash
> >hello from testbash
> >1018/_/d/_mysetup> cat > /usr/home/mybin/testperl
> >#!/usr/bin/perl
> >print "hello from testperl\n";
> >1019/_/d/_mysetup> /usr/home/mybin/testperl
> >Can't open perl script "/usr/home/mybin/testperl": No such 
> file or directory
> >1020/_/d/_mysetup> ls -l /usr/bin/perl
> >-rwxr-xr-x   1 administ Administ    20480 Mar 24 11:37 /usr/bin/perl*
> >1021/_/d/_mysetup> ls -l /usr/bin/perl.exe
> >-rwxr-xr-x   1 administ Administ    20480 Mar 24 11:37 
> /usr/bin/perl.exe*
> >1022/_/d/_mysetup> ls -l /usr/bin/bash
> >-rwxr-xr-x   1 administ Administ   466944 Jun  1 18:50 /usr/bin/bash*
> >1023/_/d/_mysetup> ls -l /usr/bin/bash.exe
> >-rwxr-xr-x   1 administ Administ   466944 Jun  1 18:50 
> /usr/bin/bash.exe*
> >1024/_/d/_mysetup> mount
> >Device              Directory           Type         Flags
> >c:\bin              /usr/bin            user         binmode
> >c:\lib              /usr/lib            user         binmode
> >d:                  /d                  user         textmode
> >f:                  /f                  user         textmode
> >c:                  /                   user         binmode
> >e:                  /e                  user         textmode
> >1025/_/d/_mysetup> cd /
> >1026/> /usr/home/mybin/testperl
> >hello from testperl
> >
> >Thanks,
> >Steve
> >-- 
> >Steven Tolkin          steve.tolkin@fmr.com      617-563-0516 
> >Fidelity Investments   82 Devonshire St. R24D    Boston MA 02109
> >There is nothing so practical as a good theory.  Comments are by me, 
> >not Fidelity Investments, its subsidiaries or affiliates.
...
> -- 
> cgf@cygnus.com                        Cygnus Solutions, a Red 
> Hat company
> http://sourceware.cygnus.com/         http://www.redhat.com/
> 

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]