I need to set the an environment variable from within Perl. Ideally, I need to query a variable and then change it if it is not what is required. Specifically it is the PATH var
You can do that using the %ENV hash
%ENV
$ENV{PATH} = 'C:\\Windows\;D:\\Programs';