The array @INC contains the list of places that the do EXPR
, require
, or use
constructs look for their library files. It initially consists of the arguments to any -I command-line switches, followed by the default Perl library, probably /usr/local/lib/perl, followed by ".", to represent the current directory. If you need to modify this at runtime, you should use the use lib
pragma to get the machine-dependent library properly loaded also:
use lib '/mypath/libdir/';
use SomeMod;