Keeping changes to %ENV in Win32 process

J

jeffeld

Hi,

I have a couple of scripts where I want to keep changes made to the
process environment variables after the perl script ends.

e.g.

In jeff.pl

$ENV{JEFF}="FOO";

and then in a Win32 .cmd file

perl jeff.pl
echo %JEFF%

Is this possible? If not, what would be a better way to return a simple
status to the command shell for processing after the script has ended.

Thanks,
Jeff
 
P

Paul Lalli

jeffeld said:
I have a couple of scripts where I want to keep changes made to the
process environment variables after the perl script ends.

Please check the Perl FAQ *before* posting!!
perldoc -q environment

Is this possible? If not, what would be a better way to return a simple
status to the command shell for processing after the script has ended.

Why aren't you just using the exit status from your program?

perldoc -f exit

Paul Lalli
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,276
Latest member
Sawatmakal

Latest Threads

Top