> -----Original Message-----
> From: Babichev Dmitry [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, December 01, 2001 8:35 AM
> To: [EMAIL PROTECTED]
> Subject: PERLDB_OPTS
> 
> 
> Hello beginners,
> 
>  How i can change environment variables (e.g. PERLDB_OPTS) to any
>  values so they remained general(public) for all instances of perl
>  scripts?
> 
> $ENV{'PERLDB_OPTS'}="LocalPort"; # working only for currently running
> script.

Environments belong to *processes*, and a process cannot change the
environment of another process, with one exception: when a new
process is created with fork(), the child process is initialized with
a copy of the environment of its parent.

Typically you accomplish this kind of thing by setting the variable in
some kind of shell initialization script like .profile which is read
by your shell when it starts. Then when you start any program from your
shell, that program will pick up the setting, since it's a child of the
shell. That still doesn't take care of processes that aren't started by
your shell (web servers, etc.). Those programs will have their own way
of initializing their environment (e.g. Apache's httpd.conf file).

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to