delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/09/06/15:47:23

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-Id: <sb979a38.074@nrcgwia.nrc.gov>
X-Mailer: Novell GroupWise 5.5.4
Date: Thu, 06 Sep 2001 15:45:46 -0400
From: "Christopher Murray" <CJM4 AT nrc DOT gov>
To: <cygwin AT cygwin DOT com>
Subject: Some questions concerning perl and sh
Mime-Version: 1.0
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id PAA03293

Hi,

First of all, let me say that I am absolutely in love with the product that you all have created.  It has really increased my productivity a hundred-fold.

Here is my issue:

My standard mode of operations has always been to run perl scripts with Activestate perl in conjunction with cygwin (tcsh shell prompt).  This has worked fine for me for the better part of 4 years, but I have always lived with the fact that I could never run my perl script (which would reference #!/usr/local/Perl/bin/perl -w) from a remote directory.  It always has to be run from the current directory.  Well, I finally decided that I don't want to be bound by this restriction anymore.  

So given that cygwin for some time now has been packaging perl with its setup program, I figured that running the native cygwin port would fix this problem.  It does.  But I had to create a symbolic link from sh.exe to bash.exe because the cygwin perl would not properly run my perl scripts without sh in my path.  (I make use of some "system" commands, so I think it was tripping over these)

Also note that I don't do anything fancy to customize my cygwin environment - whatever setup tries to do in terms of pathnames and mountpoints, I keep those.  The only things I diddle are $PATH, $CYGWIN, $MAKE_MODE - all from NT Environment settings.

Anyway, my questions are this:

1)  What is it about Activestate perl that prevents one from accessing /usr/bin/perl -w (or c:/cygwin/usr/bin/perl, or /cygdrive/c/usr/bin/perl) in the shebang line of the script when the script is not in the cwd?  Is there any way around this (and still use Activestate perl)? 

2)  What is it about cygwin-ported perl that it must know about sh when running "system"?  Where is sh.exe?  Is creating a link to bash the only way to resolve this? 

If my lack of knowledge can be fixed by a pointer to some verbage somewhere that explains these issues, then I would just be happy with that.  

Thanks again for a great product.
Chris


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019