in reply to How to set LD_LIBRARY_PATH

LD_LIBRARY_PATH must be set before you launch perl

So if you want to set LD_LIBRARY_PATH from inside perl, you have to relaunch your script

See Re^5: replicating the command 'unset LIBPATH' in perl