Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Re: setenv

by fundflow (Chaplain)
on Jul 25, 2000 at 01:39 UTC ( [id://24198] : note . print w/replies, xml ) Need Help??

in reply to setenv

The enviromnent variables are part of the environment supplied by the operating system, just like memory and disk access.
(This is true for Unixes, i don't know about DOS)

Any program has a mechanism can set these variables in its memory space. These values get transfered to new children via the fork() system call. This is the reason that you can set such variable in bash/csh/tcsh etc and then run a program (i.e. fork) which can see these variables.

If memory serves, the C library has the info about it.
The perl way is $ENV{WHATEVER} as was mentioned above.

Cheers :)