On Mon, Jan 11, 1999 at 10:09:15AM +0000, Jules Bean wrote: > On Sun, 10 Jan 1999, Marcus Brinkmann wrote: > > Question: Can I modify the environment of the invoking shell from inside a > > perl script? This would make it easier to use the script. > > Nope. > > (This is more or less fundamental to the way environment variables work).
okay. This is the same answer as Wicherts. I was afraid that it is so. > The standard approach is to eval the output of a program. c.f. > > eval `ssh-add` > > as used by ssh. I will suggest something like this in the documentation then. I was a bit surprised that the following does not work: #!/bin/sh # output echo ABC=abc #!/bin/sh # trial echo $ABC flora:/tmp# `sh output` sh trial bash: ABC=abc: command not found flora:/tmp# sh `sh output` sh trial ABC=abc: ABC=abc: No such file or directory But: flora:/tmp# ABC=abc sh trial abc Marcus -- "Rhubarb is no Egyptian god." Debian GNU/Linux finger brinkmd@ Marcus Brinkmann http://www.debian.org master.debian.org [EMAIL PROTECTED] for public PGP Key http://homepage.ruhr-uni-bochum.de/Marcus.Brinkmann/ PGP Key ID 36E7CD09

