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


in reply to Apache, no suexec, suid and the environment

In *nix, LD_LIBRARY_PATH is commonly a colon-separated list of directories. If you do not wish to clobber existing directories, you may want to either append or prepend a path:
$ENV{LD_LIBRARY_PATH} .= ":/my/new/path"; # append $ENV{LD_LIBRARY_PATH} = "/my/before/path:" . $ENV{LD_LIBRARY_PATH}; +# prepend

It is also a good practice to check if LD_LIBRARY_PATH is defined before doing this.