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

Ok, it looks like you are using Strawberry Perl to install Win32::GuiTest then trying to run one of the example scripts using ActiveState Perl.

From the command line perl -V will give you details about which version of Perl is being run. Strawberry Perl is installed to c:\strawberry by default IIRC. You need to address that issue but I think you already had a long discusion about this topic in the ChatterBox yesterday.

I can't advise on uninstalling ActiveState Perl from your machine, because I don't know your reasons for having both versions installed.

Martin

Replies are listed 'Best First'.
Re^4: Problem running Sample code in Strawberry perl
by Corion (Patriarch) on Sep 15, 2009 at 12:52 UTC

    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%
Re^4: Problem running Sample code in Strawberry perl
by rohn (Initiate) on Sep 15, 2009 at 12:57 UTC

    Thanks Martin for the help

    After uninstalling the Active perl now when I run the calc.pl it gives same error

    C:\Documents and Settings\admin\Desktop>perl calc.pl Can't locate loadable object for module Win32::GuiTest in @INC (@INC c +ontains: C :/strawberry/perl/lib C:/strawberry/perl/site/lib .) at calc.pl line 1 Compilation failed in require at calc.pl line 1. BEGIN failed--compilation aborted at calc.pl line 1.

    I think Active perl and strawberry perl both are not getting the path of Win32::GuiTest module ?

    The problem was solved by following Martin and corion suggestions thanks all for the help.
      I think Active perl and strawberry perl both are not getting the path of Win32::GuiTest module ?

      Where did you install it? or Why do you think it is installed?