The key is to define a variable first, then use the BEGIN block to initialize the variable, then reference the variable in use lib $var; later on ;-} For example, enable a module contained in the same directory as a script called via the PATH:
Categories: How-To's, Technology Tags: @INC, compile, Compile-time, Dir, directory, howto, include, lib, Library, module, Path, perl, require, Run-time, runtime, tips, Use, use lib | No comments