On my current project, we use MPC to generate Visual Studio .NET 2003 solution files. It's a set of Perl scripts. Earlier this month, MPC started to fail under Cygwin Perl, and I have to uninstall it and start using ActiveState Perl. To keep on doing what I do, running the Perl scripts from the Cygwin bash shell, I wrote a little bash script, named it perl and put its directory in the PATH in front of the ActiveState Perl's directory:
#!/bin/bash
#
# Call ActiveState Perl with path-like parameters converted from
# Cygwin format to Windows format.
#
ACTIVESTATE_PERL=C:/Perl/bin/perl.exe
declare -a args
declare -i index
until [ -z "$1" ]
do
if echo $1 | egrep -q '^/|^\.'
then
args[index]=`cygpath -a -w $1`
else
args[index]=$1
fi
((index++))
shift
done
$ACTIVESTATE_PERL ${args[@]}