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



On Sat, Jun 28, 2008 at 1:52 AM, ThierryLam <lamthierry@xxxxxxxxx> 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 not a smart way.

if ($envname =~ /^ProgramFiles$/i) {
$envname = 'ProgramFiles';
}


--
Regards,
Jeff. - Peng.Kyo@xxxxxxxxx
.