in reply to Re^2: DynaLoader and LD_LIBRARY_PATH
in thread DynaLoader and LD_LIBRARY_PATH

Close. The exec line would look like this:

exec($^X, $0, @ARGV);
And you don't need the exit line - when exec runs, it replaces the current process with the new process. The "current" process won't even exist anymore - processing continues at the beginning of the new program.