in reply to Adding a directory to $ENV{PATH}

This has been answered in Q&A. hold on and I'll give you a link.Here you go: Re: How can I change the environment from within my Perl script? (Adam: edit registry)