<P>Perl maintains environment variables in a special hash named <CODE>%ENV</CODE>. For
when this access method is inconvenient, the Perl module <CODE>Env</CODE> allows
environment variables to be treated as scalar or array variables.</P>
<P>The <A HREF="../lib/Pod/perlfunc.html#item_import"><CODE>Env::import()</CODE></A> function ties environment variables with suitable
names to global Perl variables with the same names. By default it
ties all existing environment variables (<CODE>keys %ENV</CODE>) to scalars. If
the <A HREF="../lib/Pod/perlfunc.html#item_import"><CODE>import</CODE></A> function receives arguments, it takes them to be a list of
variables to tie; it's okay if they don't yet exist. The scalar type
prefix '$' is inferred for any element of this list not prefixed by '$'
or '@'. Arrays are implemented in terms of <A HREF="../lib/Pod/perlfunc.html#item_split"><CODE>split</CODE></A> and <A HREF="../lib/Pod/perlfunc.html#item_join"><CODE>join</CODE></A>, using
<CODE>$Config::Config{path_sep}</CODE> as the delimiter.</P>
<P>After an environment variable is tied, merely use it like a normal variable.
You may access its value</P>
<PRE>
@path = split(/:/, $PATH);
print join("\n", @LD_LIBRARY_PATH), "\n";</PRE>
<P>or modify it</P>
<PRE>
$PATH .= ":.";
push @LD_LIBRARY_PATH, $dir;</PRE>
<P>however you'd like. Bear in mind, however, that each access to a tied array
variable requires splitting the environment variable's string anew.</P>
<P>The code:</P>
<PRE>
use Env qw(@PATH);
push @PATH, '.';</PRE>
<P>is equivalent to:</P>
<PRE>
use Env qw(PATH);
$PATH .= ":.";</PRE>
<P>except that if <CODE>$ENV{PATH}</CODE> started out empty, the second approach leaves
it with the (odd) value ``<CODE>:.</CODE>'', but the first approach leaves it with ``<CODE>.</CODE>''.</P>
<P>To remove a tied environment variable from
the environment, assign it the undefined value</P>
<PRE>
undef $PATH;
undef @LD_LIBRARY_PATH;</PRE>
<P>
<HR>
<H1><A NAME="limitations">LIMITATIONS</A></H1>
<P>On VMS systems, arrays tied to environment variables are read-only. Attempting