if [ -e "c:\path\to\perl1" ] then c:\path\to\perl1\bin\perl myscript.pl else c:\path\to\perl2\bin\perl myscript.pl fi