in reply to Re: Setting env vars in current process
in thread Setting env vars in current process

Hmm, thanks. Your test works fine for me also. I think there must be another problem. Basically, the LD_LIBRARY_PATH of the parent shell points at libxml (C library) v2.4.22, whereas my Perl program uses a Lib::XML which only works with libxml v2.4.24 and above. So, in my Perl program, I set LD_LIBRARY_PATH to libxml v2.4.24 in a BEGIN block. However, this does not seem to be having the desired effect. Maybe I am missing something... Cheers Kevin
  • Comment on Re: Re: Setting env vars in current process

Replies are listed 'Best First'.
Re (3): Setting env vars in current process
by VSarkiss (Monsignor) on Feb 11, 2003 at 19:34 UTC
      Ah, many thanks for that. (Worries about the loader caching values did very faintly cross my mind - obviously much too faintly :-) I will read all the material and sort out the best approach in my case.

      Thanks again. Kevin

Re: Re: Re: Setting env vars in current process
by pfaut (Priest) on Feb 11, 2003 at 19:32 UTC

    It might be too late. The loader that loaded perl is probably the same loader that's loading your shared libraries. It has already initialized and is no longer looking for that environment variable. You probably have to set the variable before invoking perl.

    --- print map { my ($m)=1<<hex($_)&11?' ':''; $m.=substr('AHJPacehklnorstu',hex($_),1) } split //,'2fde0abe76c36c914586c';