in reply to Need way to override PERL5LIB from inside pl script file

Call perl.exe via a helper script that explicitly deletes PERL5LIB from the environment. A simple three-line batch file may be sufficient:

@echo off SET PERL5LIB= perl yourscript.pl

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

Replies are listed 'Best First'.
Re^2: Need way to override PERL5LIB from inside pl script file
by eyepopslikeamosquito (Archbishop) on Jun 24, 2015 at 23:59 UTC

    Yes, this approach may be handy if you have hundreds of Perl scripts, and don't want to edit them all:

    @echo off SETLOCAL SET PERL5LIB= @C:\Path to your perl\bin\perl.exe %*
    Note that I (gutlessly) added SETLOCAL so that changes to PERL5LIB apply for the running of your BAT file only and so cannot interfere with Oracle Perl scripts that depend on the global value of PERL5LIB.