in reply to Best way to find Environment TEMP
$TempPath = $ENV{TMP} | $ENV{TEMP} | "$ENV{SYSTEMROOT}.\TEMP";You want logical-or ("||") not bitwise-or ("|").
$TempPath = $ENV{TMP} || $ENV{TEMP} || "$ENV{SYSTEMROOT}.\TEMP";
See perlop for the reasons why.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Best way to find Environment TEMP
by coldmiser (Hermit) on Jun 11, 2007 at 19:39 UTC |