How do you use a variable in lib Path?

后端 未结 3 1868
离开以前
离开以前 2021-02-19 14:43

I would like to use the $var variable in lib path.

my $var = \"/home/usr/bibfile;\"

use lib \"$var/lib/\";

However when I do th

3条回答
  •  礼貌的吻别
    2021-02-19 15:10

    Not sure about what you're trying to accomplish, but seems like a task for FindBin::libs:

    my $var;
    BEGIN { $var = "/home/usr/bibfile" };
    use FindBin::libs "Bin=$var", "base=lib";
    

提交回复
热议问题