http://www.perlmonks.org?node_id=295097


in reply to %ENV on exotic platforms

Every platform that Perl runs on has a native structure to match %ENV. While it may be odd and complex (such as VMS' mapping of %ENV to the symbol and logical tables) it is there, and behaves as you'd expect it to behave, and can be assumed to work as it would on Unix systems.

The interaction of the %ENV-analogue and spawned subprocesses may be interesting, that's very platform-dependent anyway, and as such is likely something you're not going to need to worry about. To keep it safe, don't use common names or abbreviations as ENV keys (such as LIB, COMMON, SRC, INCLUDE, or TMP) and try not to make the names too long (assume you've no more than 16 characters for the key and 125 characters for the value).

Files are generally more portable, though.