On Monday, April 22, 2002, at 11:50 , Levan, Jerry wrote:
>> Is there any way to globally add an INC directory to Perl after
>> compilation?
>>
>> I know about setenv PERLLIB5 and do that in my .cshrc.
>>
>> But it doesn't get set when I run Perl from within BBEdit or cron.
>> Is there any way to do this so it is truly global (it can just be
>> across me as the user or for all users, since I'm the only user
>> anyway, as long as that will work with things like BBEdit and cron).
>>
>> Thanks,
>>   Peter.
>
> In a pinch you could do something like:
>
>    push @INC , "Pathtofile"
>
> At the top of your program, you might have to use
> A Begin block to enclose the push for "use" access
> Rather than "require" access.


More elegant solution;

use lib qw(/your/directory);

Dan the Man with Too Many perlvar manglings these days

Reply via email to