in reply to strict.pm error

I would assume that you are mixing versions of strict.pm and versions of Perl.exe that were not distributed together. Stop doing that.

The line in question is

my (undef, $f, $l) = caller;

... which works under 5.12 and (obviously) 5.14. You can go and look at strict.pm to see what version of the file you have, and then run perl -v to see what version of Perl you are running, and then at perlrun to investigate why your version of Perl is picking up files from a version of Perl that it should not see.

Replies are listed 'Best First'.
Re^2: strict.pm error
by greenhornks (Initiate) on Dec 22, 2011 at 12:58 UTC
    Thanks a lot, I had an old perl version on PC and the newer version in bin directory. I cannot change path and settings on my notebook. The Version did in deed not match the strict.pm. Sorry I am an bloody greenhorn

      You can indeed change the path and the environment before invoking Perl. For example, I use a batch file like this to set up the environment for every version of Perl I use:

      @echo off set base=%~dp0 path %BASE%perl\bin;%BASE%c\bin;%BASE%perl\site\bin;%PATH%

      This file lives in the base directory of every Perl installation I have, like C:\strawberry-5.10 and C:\strawberry (which is currently 5.12). If I want to switch to a particular Perl, I invoke the batch file in the appropriate directory and thus switch the Perl for that shell window.