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

2008-06-28 Thread sisyphus
On Jun 29, 1:18 am, [EMAIL PROTECTED] (Rob Dixon) wrote: . . > > All of the keys of %ENV are capitalized for Windows as the environment > variable > names aren't case-sensitive. > However, I'm finding that system() honours case-preservation. From my reply to the same thread in comp.lang.perl.misc

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

2008-06-28 Thread Rob Dixon
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

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

2008-06-28 Thread Dr.Ruud
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 ca

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

2008-06-28 Thread Rob Dixon
ThierryLam wrote: > > On Windows XP Pro 32 bit, if I want to output environment variables > PYTHON or ProgramFiles, I use the set command which output the > following: > > C:\set PYTHON > PYTHON=C:\Python24\python.exe > C:\set ProgramFiles > ProgramFiles=C:\Program Files > > If I used Perl 5.003_

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

2008-06-27 Thread Jeff Peng
On Sat, Jun 28, 2008 at 1:52 AM, ThierryLam <[EMAIL PROTECTED]> wrote: > > 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(...)? > Could use a regex, but maybe

Using System to read mixed cased environment variables on Windows

2008-06-27 Thread ThierryLam
On Windows XP Pro 32 bit, if I want to output environment variables PYTHON or ProgramFiles, I use the set command which output the following: C:\set PYTHON PYTHON=C:\Python24\python.exe C:\set ProgramFiles ProgramFiles=C:\Program Files If I used Perl 5.003_07 and use the system subroutine to show