in reply to Case insensitive keys in global %ENV
C:\>perl -le"$ENV{lowerlowerlower}=1;print for keys %ENV" USERPROFILE HOMEDRIVE CLIENTNAME COMMONPROGRAMFILES APPDATA PROGRAMFILES OS PATHEXT PROMPT NUMBER_OF_PROCESSORS HOMEPATH PATH USERDOMAIN PROCESSOR_ARCHITECTURE TEMP SYSTEMDRIVE COMSPEC WINDIR PROCESSOR_LEVEL USERNAME LOWERLOWERLOWER PROCESSOR_IDENTIFIER ALLUSERSPROFILE COMPUTERNAME C:\>
Don't count on a specific environment variable existing in %ENV. Don't count on %ENV entries being case-sensitive, or even case-preserving. Don't try to clear %ENV by saying "%ENV = ();", or, if you really have to, make it conditional on "$^O ne 'VMS'" since in VMS the %ENV table is much more than a per-process key-value string table.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Case insensitive keys in global %ENV
by bruceb3 (Pilgrim) on Aug 15, 2007 at 08:59 UTC |