[ale] [OT] export inside perl

Fletch fletch at phydeaux.org
Wed Oct 23 09:44:02 EDT 2002



$ perldoc -q envrionment

Found in /usr/lib/perl5/5.6.1/pod/perlfaq8.pod
       I {changed directory, modified my environment} in a perl
       script.  How come the change disappeared when I exited the
       script?  How do I get my changes to be visible?

               Unix
                   In the strictest sense, it can't be done--the
                   script executes as a different process from
                   the shell it was started from.  Changes to a
                   process are not reflected in its parent--only
                   in any children created after the change.
                   There is shell magic that may allow you to
                   fake it by eval()ing the script's output in
                   your shell; check out the comp.unix.questions
                   FAQ for details.


        perldoc knows all.

        Trust perldoc.

-- 
Fletch                | "If you find my answers frightening,       __`'/|
fletch at phydeaux.org   |  Vincent, you should cease askin'          \ o.O'
770 294-0820 (m)      |  scary questions." -- Jules                =(___)=
                      |                                               U

---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
sent to listmaster at ale dot org.






More information about the Ale mailing list