[Perl-unix-users] Using variables in a library path

2006-02-28 Thread Makarov, Vladimir/Medical Library
Hello, I am trying to trivial things (I think): Instead of using Use lib '\web_test\scripts\common\'; Require 'header.pl'; For portability reason (I have also "web_production"), I tried to assign a scalar varible to the part of the path, such as Our $BASE_PATH = '\web_test\'; Use lib $BASE_P

Re: [Perl-unix-users] Using variables in a library path

2006-02-28 Thread Anthony Ettinger
try this: my $lib = $base . "/path/to/libs"; use lib qw($lib); I read something about loading dynamic library paths at runtime though was not a good idea. On 2/28/06, Makarov, Vladimir/Medical Library <[EMAIL PROTECTED]> wrote: > > > Hello, > > I am trying to trivial things (I think): > Instead

Re: [Perl-unix-users] Using variables in a library path

2006-02-28 Thread $Bill Luebkert
Makarov, Vladimir/Medical Library wrote: > > Hello, > > I am trying to trivial things (I think): > Instead of using > > Use lib '\web_test\scripts\common\'; > Require 'header.pl'; Case is relevent in Perl and \s aren't portable, so use /s whenever possible. The \' is invalid syntax at the end

Antwort: [Perl-unix-users] Using variables in a library path

2006-02-28 Thread Georg . Mavridis
Hi Vladimir, This code Our $BASE_PATH = '\web_test\'; Use lib $BASE_PATH.'scripts\common\'; Require 'header.pl'; can't work as use "statements" are executed by perl before of the rest of the code. The most common way 2 solve this problem is 2 use constants: use constant BASE_PATH => '\web_te