X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Message-ID: <4758985E.9040303@etr-usa.com> Date: Thu, 06 Dec 2007 17:48:30 -0700 From: Warren Young User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: Cygwin-L Subject: Re: Wish Setup would accept my Perl References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Michael Kairys wrote: > > I want to type "perl foo.pl" at the Bash prompt [snip] > I suppose I could rewrite my Bash aliases so "foo" equals "/c/Perl/bin/perl > foo.pl" The solution is to break your habit of saying "perl foo.pl". If the first line of a text file begins with "#!" and a valid path name to an executable follows it, Cygwin -- like any *ix -- will consider the executable to be the interpreter for that file, and pass the script as the first argument to the interpreter. So, if you put: #!/usr/bin/perl at the top and run it with the command "foo.pl" from a Cygwin Bash prompt, you get Cygwin perl. No need to reference perl explicitly. If you find that you still need ActiveState Perl, you can use Windows Explorer to associate .pl with it. Then if you run foo.pl from a Run box, an Explorer window, or a cmd.exe prompt, you get AS Perl. None of this helps if you want to use AS Perl from Cygwin or vice versa, of course. -- 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/