How To Dynamically Add a Path to the Perl @INC At Compile-Time

Published Date Author: , Posted April 16th, 2021 at 3:07:24pm

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:

No comments as yet.

Leave Your Comment  Leave a comment

All fields marked with "*" are required.