in reply to Re^3: Problem running Sample code in Strawberry perl
in thread Problem running Sample code in Strawberry perl

I think when launching Perl, it's best to either set up $ENV{PATH} so that only one perl.exe is found, or to be (very) explicit in specifying which perl.exe to use.

For example the following will always launch Strawberry Perl:

c:\strawberry\perl\bin\perl.exe myscript.pl

Personally, I have a file path.cmd in each directory containing a Perl installation, which sets up $ENV{PATH} so that only the perl.exe below it is found:

@echo off SET BASE=%~dp0 path %BASE%\perl\bin;%BASE%\mingw\bin;%BASE%\dmake\bin;%PATH%