This is the mail archive of the
mailing list for the Cygwin project.
activestate perl on cygwin
- From: "Kevin T Cella" <kcella at nycap dot rr dot com>
- To: <cygwin at cygwin dot com>
- Date: Mon, 8 Jan 2007 22:56:35 -0500
- Subject: activestate perl on cygwin
I understand the trouble with using Activestate perl on cygwin is the path
conversion problem. Searching online I found the following wrapper script
useful for most perl commands:
# This is necessary to make perl work with cygwin. Cygwin passes
# "cygwin style" paths to the program in the #! statement and
# perl does not know what /cygwin/d/... means.
# So, we put #!/usr/local/bin/perl in the perl script and this is
# This routine translates the path name to something of type d:/
while [ $# -gt 0 ]
if test "`echo $var | grep '/'`" = "$var"
# cygpath does the /cygwin/d/ to d:/ conversion
var=`cygpath -w $var`
# Then we have to swap \ for / (extra \ needed because the
# shell makes a first pass at removing the \.
var=`echo "$var" | sed 's/\\\/\\//g'`
# Finally the command is to call perl with the name of the script
and the args.
An example of one that does not work is as follows:
perl -e 'print join "\n", @INC, "\n";'
For some reason, the script above strips the single quotes from the command
and therefore does not execute the command properly. Please advise.
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html