October 2006
Intermediate to advanced
888 pages
16h 55m
English
Occasionally we need to access environment variables as a link between our program and the outer world. An environment variable is essentially a label referring to a piece of text (typically a small piece); environment variables can be used to store configuration information such as paths, usernames, and so on.
The notion of an environment variable is common in the UNIX world. The Windows world has borrowed it from UNIX (by way of MS-DOS), so the code we show here should run on variants of both Windows and UNIX.
The global constant ENV can be used as a hash both for purposes of retrieving and assigning values. In the following code, we retrieve the value ...
Read now
Unlock full access