[ale] [OT] export inside perl

Geoffrey esoteric at 3times25.net
Wed Oct 23 10:38:50 EDT 2002


But, you could do something like the following to pass this information 
'back' to the parent:


#foo.sh

set $(foo.pl)

#end foo.sh



#foo.pl

print "val1=4 val3=5\n";

#end foo.pl



Fletch wrote:
> $ 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.
> 

-- 
Until later: Geoffrey		esoteric at 3times25.net

I didn't have to buy my radio from a specific company to listen
to FM, why doesn't that apply to the Internet (anymore...)?


---
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