Re: Using System to read mixed cased environment variables on Windows
- From: rob.dixon@xxxxxxx (Rob Dixon)
- Date: Sat, 28 Jun 2008 16:18:37 +0100
Dr.Ruud wrote:
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;"
All of the keys of %ENV are capitalized for Windows as the environment variable
names aren't case-sensitive.
Rob
.
- Follow-Ups:
- References:
- Prev by Date: Re: Limiting Toke::Parser
- Next by Date: show only numbers before, within or after the text
- Previous by thread: Re: Using System to read mixed cased environment variables on Windows
- Next by thread: Re: Using System to read mixed cased environment variables on Windows
- Index(es):
Relevant Pages
|