Greg> I want to write a perl script to replace a Unix shell script
Greg> which does nothing other than create and set environment
Greg> variables.
"perldoc -q environment" sez:
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.
So, you could to do something like
$ eval `script_that_produces_env_settings`
_______________________________________________
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm