in reply to Unexpected die
That won't work.
Even if it did, it would fail to work in the way you want. The exec would replace the perl process with a shell that runs that source command. In that shell, the environment would be like you want. But that shell would be a child of the invoking shell and although children can inherit an environment from their parent (if the parent exports) it doesn't work the other way around.
You'd need perl to exec a new login shell and specify an initialization file for it. That would get you closer to what you want but the shell that invoked perl in the first place would still be there underneath everything. So, your users would have to exit both shells. That is unless you ran this script as the login shell.
Good luck!
-sauoq "My two cents aren't worth a dime.";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Unexpected die
by peschkaj (Pilgrim) on Aug 09, 2002 at 02:41 UTC | |
by graff (Chancellor) on Aug 09, 2002 at 04:28 UTC | |
by sauoq (Abbot) on Aug 09, 2002 at 03:20 UTC |