Well i think that is going to work. I do not have access to the Linux machine right now but on my windows machine i tried the below to be sure. I think it is going to work the same way irrespective of the OS:

1. Create a variable called test_var and assigned a value of abc to it. 2. Created a perl script to read the value of the test_var and it returned abcd. Change it to xyz using env hash and it worked. 3. Create a batch script which would do echo %test_var%. 4. From perl script called the batch script before and after changing the value of the environment variable and it reflected the changes, so i think i should be good now. Will let you know if i face any issues.

I agree that this shoud work on most operating systems. However, do not expect the new value to be available after your perl script ends. (Run your shell script from the command line. It will output "abcd") Good Luck, Bill

I was able to get hold of the linux machine and tried doing the same on it. It worked and even my CLI.sh was able to read from the new variable set from inside the script instead of the one set at the OS level.

As you rightly pointed out the new value will be available only within the script itself as a new child process will be spawned once i run the script. And this is my exact requirement.