I think what you have to do is set an environment variable from within perl, which you can do quite easily. There is a special hash variable called %ENV that you set like this:
$ENV{LIBPATH} = "/opt/freeware/lib:/opt/freeware/64/lib:/usr/lib:$ENV{
+LIBPATH}";
Best of luck!
(Note that using backticks to do something like `export LIBPATH=/opt/freeware/lib:/opt/freeware/64/lib:/usr/lib:$LIBPATH`
launches a shell, sets the environment variable in that shell, then quits, which doesn't do you much good.)