class ENV

ENV is a hash-like accessor for environment variables.

Interaction with the Operating System

The ENV object interacts with the operating system’s environment variables:

Names and Values

Generally, a name or value is a String.

Valid Names and Values

Each name or value must be one of the following:

Invalid Names and Values

A new name:

A new name or value:

About Ordering

ENV enumerates its name/value pairs in the order found in the operating system’s environment variables. Therefore the ordering of ENV content is OS-dependent, and may be indeterminate.

This will be seen in:

About the Examples

Some methods in ENV return ENV itself. Typically, there are many environment variables. It’s not useful to display a large ENV in the examples here, so most example snippets begin by resetting the contents of ENV:

What’s Here

First, what’s elsewhere. Class ENV:

Here, class ENV provides methods that are useful for:

Methods for Querying

Methods for Assigning

Methods for Deleting

Methods for Iterating

Methods for Converting

More Methods