I would like to use the $var variable in lib path.
my $var = "/home/usr/bibfile;"
use lib "$var/lib/";
However when I do this it throws an error.
I’d like to use use lib "$var/lib/";instead of use lib "/home/usr/bibfile/lib/";.
How can I assign a variable, so that it can be used in the setting of lib modules?
Variables work fine in
use lib, well, just like they do in any string. However, since allusedirectives are executed inBEGINblock, your variable will be not yet initialized at the moment you runuse, so you need to put initialization inBEGINblock too.Gives: