in reply to Setting DOS Environment Variables

I'm not sure about DOS, but in Unix a Perl script can't change the environment of the shell it's executed from. You could set the variable in Perl using $ENV{whatever} and then execute the program from within Perl, which would have the new environment, or you could communicate via temp files, or perhaps you could print out the variable to be set and pull it into DOS somehow (in Unix you'd do this with backticks).

As far as starting and restarting the program, it shouldn't be a problem, although I'm not sure exactly what you want to do.

Perhaps posting some code of what you've tried and what didn't work would be helpful.