delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/12/29/12:07:31

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs
Date: Mon, 29 Dec 2003 12:06:26 -0500 (EST)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: kenneth DOT shaffer AT sciatl DOT com
cc: cygwin AT cygwin DOT com
Subject: Re: Executing Perl scripts w/o the .pl
In-Reply-To: <Pine.CYG.4.58.0312291003500.1184@Crunch.bcgssbd.sciatl.com>
Message-ID: <Pine.GSO.4.56.0312291203200.18706@slinky.cs.nyu.edu>
References: <Pine DOT CYG DOT 4 DOT 58 DOT 0312291003500 DOT 1184 AT Crunch DOT bcgssbd DOT sciatl DOT com>
MIME-Version: 1.0

On Mon, 29 Dec 2003, Shaffer, Kenneth wrote:

> If using Active Perl with cygwin, put the following as the first line of
> your perl scripts:
>
> eval 'exec perl -S `cygpath -w $0`' if 0;
> --
> Ken Shaffer

...or put the following in your /usr/local/bin:

-------------- BEGIN /usr/local/bin/wrap --------------
#!/bin/sh
pname="$1"
fname="`cygpath -w "$2"`"
shift 2 && exec "$pname" "$fname" "$@"
--------------- END /usr/local/bin/wrap ---------------

and change the #! line of the perl script to

#!/usr/local/bin/wrap /cygdrive/c/ActivePerl/bin/perl

This should work even if you have Cygwin perl installed as well.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.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