in reply to Export variables from perl to a bat file
Then its simply a matter of executing the batch file with all necessary info included.
Admittedly this is not an answer to your question but is an alternative approach to the underlying requirement.
generator
|
|---|