Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Removing entries from @INC

by LanX (Saint)
on Feb 24, 2022 at 14:44 UTC ( [id://11141618] : note . print w/replies, xml ) Need Help??


in reply to Removing entries from @INC

did you try ... ?
BEGIN { @INC = YOUR_LIST; }

... on top of your script?

update

> from the command-line option

Oops, I missed that, sorry.

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery

Replies are listed 'Best First'.
Re^2: Removing entries from @INC
by ikegami (Patriarch) on Feb 24, 2022 at 19:36 UTC
    printf ' package cleanlib; sub import { @INC = ( ); } 1 ' >cleanlib.pm perl -Mlib=. -Mcleanlib -Mlib=... ...