in reply to "use lib" with variable

The problem is that use lib happens at compile, and the assignment to $BASEDIR doesn't happen until run-time. You could put $BASEDIR in a BEGIN block though:
BEGIN { $BASEDIR = "/export/home/nrc" } use lib "$BASEDIR/mylib";

_____________________________________________________
Jeff[japhy]Pinyan: Perl, regex, and perl hacker.
s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;

Replies are listed 'Best First'.
Re: Re: "use lib" with variable
by nrc (Initiate) on Nov 03, 2001 at 00:49 UTC
    Wow, thanks for the quick response. I am humbled by our wisdom. Works like a charm!