delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/05/08/00:17:49

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: <12F176DD950ED411B68E0050DA14ED10338784@jupiter.gunzphoto.com.au>
From: Neil Lunn <neillunn AT gunz DOT com DOT au>
To: "'Mark Paulus'" <commpg AT yahoo DOT com>, cygwin AT cygwin DOT com,
Peter Buckley
<peter DOT buckley AT cportcorp DOT com>
Subject: RE: backslashes stripped in perl
Date: Tue, 8 May 2001 14:19:16 +1000
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2448.0)

Actually you should be using C:/path/executable.exe. This is compatible with
cygwin and Activestate perl.

Better Still, even the "C:" should be pulled in by a variable or config to
make your script really portable.

Neil

> -----Original Message-----
> From: Mark Paulus [mailto:commpg AT yahoo DOT com]
> Sent: Saturday, May 05, 2001 5:57 AM
> To: cygwin AT cygwin DOT com; Peter Buckley
> Subject: Re: backslashes stripped in perl
> 
> 
> have you tried using \\ where you are using \?  Perl is 
> probably seeing
> the \ as an escape character, so you need to escape the \ to preserve
> it.  You may need to play with varying levels of \ to get it right
> depending on how many downstream filters are looking at the string
> (Check out some of Don Libes discussions about backslashes in his
> Exploring Expect book)
> 
> 
> On Fri, 4 May 2001 15:44:28 -0400, Peter Buckley wrote:
> 
> >I am passing a parameter that contains backslashes in the 
> path to a perl
> >script. 
> >I am calling the perl script from a makefile macro. The line 
> in the makefile
> >is
> >
> >target :
> >	$(PERL) myscript.pl $(ARG0) $(ARG1)
> >
> >And in the perl script I have the lines 
> >
> >$VARIABLE = @ARGV[0];
> >cmd "$VARIABLE -o $OPTION -c $PATH/path/config1 -batch";
> >
> >When $(ARG0) is C:\path\executable.exe, I get the error 
> >
> >C:pathexecutable.exe: not found
> >
> >It is stripping the backslashes out. 
> >I know that it works with forward slashes, 
> >and I had similar problems with make before this 
> >(I found out how to set MAKE_MODE = win32).
> >
> >I have to use backslashes in the path.
> >I didn't find anything when I searched for 
> >backslash perl
> >in the archives, and I didn't see an entry for perl
> >in the FSF online manuals.
> >
> >I am using the NT4.0 SP5 cmd.exe as my shell. I get this failure
> >whether I explicitly set the SHELL environment variable or
> >not.
> >
> >Thanks in advance for any help,  
> >
> >Peter Buckley
> >C-Port Corporation, a Motorola Company
> >One High Street
> >No. Andover, MA 01845
> >978-773-2490
> >
> >
> >
> >
> >--
> >Want to unsubscribe from this list?
> >Check out: http://cygwin.com/ml/#unsubscribe-simple
> 
> 
> 
> 
> --
> Want to unsubscribe from this list?
> Check out: http://cygwin.com/ml/#unsubscribe-simple
> 

__________________________________________________________________________
Please Note :
Only  the intended recipient is authorised to access or use this e-mail.  If
you are not the intended recipient,
please delete this e-mail and notify the sender immediately.   The contents
of this e-mail are the writer's 
opinion and are not necessarily endorsed by the Gunz Companies unless
expressly stated.

We use virus scanning software but exclude all liability for viruses or
similar in any attachment.



--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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