in reply to Newbie - Changing @INC

One method of modifying @INC is as follows:
BEGIN { unshift(@INC, 'the/path/you/want'); }
It is important that you do it within a BEGIN block because all use statements are processed before the rest of the program; An exception to this are BEGIN blocks.

Replies are listed 'Best First'.
Re: Re: Newbie - Changing @INC
by dculpSC (Initiate) on Aug 23, 2001 at 19:44 UTC
    Will this method perserve the new @INC after the program ends ?
      No. It will change it for just the run of the program.