http://www.perlmonks.org?node_id=126575

LanceDeeply has asked for the wisdom of the Perl Monks concerning the following question:

Hi all,

I'm trying to set the LD_LIBRARY_PATH within my script, because the account that will run the script won't have the environment setup correctly.

#!/sw/perl5.6/bin/perl -I. -w use strict; use Env qw(@LD_LIBRARY_PATH); BEGIN { push @LD_LIBRARY_PATH, "/usr/local/sybase/lib"; } use Sybase::DBlib;
This does not work and I receive an error that perl cannot load the library. It's the right path - if I set my environment's LD_LIBRARY_PATH to that, the script doesnt complain. Running on SunOS 5.7...

Thanks folks