|
Posted by pgodfrin on February 21, 2008, 8:58 am
Please log in for more thread options > > I'd like to put that subroutine in a module so that I can use that
> > subroutine wherever I want to. I having problems with scoping - seems
> > the module subroutine sets the environment but then loses when control
> > is returned to the calling program. This part is hard.
>
> I'm not sure if this applies to your problem, but tou may be unaware
> that on most operating systems it's impossible to set the environment
> for anything other than the "current process" (and any child processes
> will then inherit the parent's environment).
>
> In other words, if program A fork()s program B, and program B
> changes its %ENV, program A will not see those changes. Neither will
> program B see any changes in program A's environment made after B is
> forked off.
>
> --
> Joost Diepenmaat | blog:http://joost.zeekat.nl/| work:http://zeekat.nl/
Yes I'm aware of this - I think this is a scoping issue. So program A
loads the modules, and then calls it to set the environment values. I
only care for the variables set during that process, and any other
from the calling program. However, certain variables get set and
others are not set exactly right....
I'll send some example code shortly...
pg
|