Re: Using System to read mixed cased environment variables on Windows



ThierryLam schreef:

system("set PYTHON");
system("set ProgramFiles");

Output is:
PYTHON=C:\Python24\python.exe
PROGRAMFILES=C:\Program Files

You'll notice that through system, the environment variable
ProgramFiles is all in upper case. Is there a way to preserve the
mixed case of the environment variable through system(...)?

You need a newer Perl.


What does this show you?

C:> perl -wle "print qq{$_=$ENV{$_}} for keys %ENV;"

--
Affijn, Ruud

"Gewoon is een tijger."
.