Hi All!!
I need to set Current system date as Environment Variable using a PERL or a BAT program. Some other BAT program needs to access this environment variable.
I have tried to do it using 3 different way in my PERL program (using some example instead of System date), but I am unable to set Environment variable value:
Here's what I have done:
use Win32::File;
# Method 1:
`SET dirDate=1234`;
# Method 2:
system "SET YYZ=1234";
# Method 3:
$ENV{'dirDate1'}='DB1';
############
After running above PERL Code, I go to DOS Prompt and enter SET to see the list of environment variables and their values. I dont see any of the above.
None of these environment variables get set. Can someone guide me to correct way?
Regards,
Pawan
email_pawan@yahoo.com
I need to set Current system date as Environment Variable using a PERL or a BAT program. Some other BAT program needs to access this environment variable.
I have tried to do it using 3 different way in my PERL program (using some example instead of System date), but I am unable to set Environment variable value:
Here's what I have done:
use Win32::File;
# Method 1:
`SET dirDate=1234`;
# Method 2:
system "SET YYZ=1234";
# Method 3:
$ENV{'dirDate1'}='DB1';
############
After running above PERL Code, I go to DOS Prompt and enter SET to see the list of environment variables and their values. I dont see any of the above.
None of these environment variables get set. Can someone guide me to correct way?
Regards,
Pawan
email_pawan@yahoo.com