|
Posted by rembremading on June 9, 2006, 7:24 am
Please log in for more thread options
I export the PERL_LIBRARY_PATHS environment variable by myself, so that I
can have the paths separated by whatever I like. But it doesn't work
anyway.
However I found out that
BEGIN { use lib split(':', $ENV); }
works.
Dr.Ruud wrote:
> rembremading schreef:
>
>> Is there a way to include several library paths with
>>
>> use lib
>>
>> at once, so that I can do something like
>>
>> use lib $ENV;
>>
>> The following seems not to work ...
>>
>> @array = split(/ /$ENV);
>> foreach $array_item (@array){
>> use lib $array_item;
>> }
>
> See perldoc lib.
>
> See perldoc -f split.
>
>
> I doubt that
>
> use lib split(' ', $ENV) ;
>
> will work, because the separator is likely ':', and there may be empty
> list members.
>
|