in reply to @INC: search sequence of directories

Can't replicate what you're reporting... (Suse Linux 10.1 here — though that shouldn't matter)

I tried it with several versions of Perl from 5.8.4 - 5.8.8. I always get

$ PERL5LIB=~/foo:~/bar perl -V (...) %ENV: PERL5LIB="/home/ab/foo:/home/ab/bar" @INC: /home/ab/foo /home/ab/bar /usr/local/perl-5.8.8/lib/5.8.8/x86_64-linux /usr/local/perl-5.8.8/lib/5.8.8 (...)

(same thing if you export PERL5LIB in a separate shell command, of course...)

Could you provide a ready to run test case that demonstrates your problem?

Replies are listed 'Best First'.
Re^2: @INC: search sequence of directories
by kdjantzen (Acolyte) on Apr 25, 2007 at 12:49 UTC
    Is it of any significance that you use the variable PER5LIB?
    In my bash script I create an environment variable PERLLIBDIR and in the perl script I refer to it by %ENV{PERLLIBDIR}

      yes, PERL5LIB is a special env variable for just that purpose :)

      In case you'd rather make use of PERLLIBDIR, something like use lib split /:/, $ENV{PERLLIBDIR}; in your script should work as well.

      (I suppose the '%' in %ENV{...} was just a typo...)

        Thank you.
        That clarified a couple of things.