in reply to Keeping environment variables after perl has exited

If you know what kind of shell you are speaking to, you can simply print the right commands to STDOUT, as:
$ eval `myscript`
and for sh-style shells, you send out:
FOO=one; export FOO BAR=two; export BAR
The problem is you have to be aware about the shell. This is similar to what tset(1) does: see the docs there.

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.