Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!uunet!convex!usenet From: tchrist@convex.COM (Tom Christiansen) Newsgroups: comp.lang.perl Subject: Re: How to export Environment variables from a perl script to the shell? Keywords: shell environment variables Message-ID: <1991Apr14.072710.25063@convex.com> Date: 14 Apr 91 07:27:10 GMT References: <1991Apr13.192319.63@eagle.inesc.pt.inesc.pt> Sender: usenet@convex.com (news access account) Reply-To: tchrist@convex.COM (Tom Christiansen) Organization: CONVEX Software Development, Richardson, TX Lines: 16 Nntp-Posting-Host: pixel.convex.com From the keyboard of jmc@eagle.inesc.pt (Miguel Casteleiro): :I need to set some environment variables in a Perl script, :and, at the end of the script, I need them to be exported to :the running shell (tcsh). So, how can I do that? You need to write them to stdout and eval the output. % eval `cmd` where cmd is a perl script that outputs something like: setenv foo bar; setenv alpha omega; etc. --tom