Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!sdd.hp.com!elroy.jpl.nasa.gov!jpl-devvax!lwall From: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Newsgroups: comp.lang.perl Subject: Re: %ENV vs. exported environment. Keywords: %ENV environment bug question Message-ID: <8658@jpl-devvax.JPL.NASA.GOV> Date: 9 Jul 90 23:12:12 GMT References: <1990Jul7.060454.12400@tc.fluke.COM> Reply-To: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Organization: Jet Propulsion Laboratory, Pasadena, CA Lines: 31 In article <1990Jul7.060454.12400@tc.fluke.COM> dcd@tc.fluke.COM (David Dyck) writes: : : I have been having unexpected results with %ENV. : : Has anyone else noticed that undef %ENV, : will undefine %ENV in the perl environment, but it doesn't effect : the exported environment (to child system processes). : : Adding new values to %ENV will export the new elements : to sub processes, but the old 'undef'ed values are still : exported also. : : deleting specific values from %ENV seems to be the same : as setting that variable to "", instead of removing : it from the environment. : : Only reset clears the exported environment. : : Is this by design? : If so, why? No, it just kinda came out that way. I'd need to add a little code to make clearing %ENV work right, and I just haven't done it. The reset happens to work because there's code in there to catch it. Deleting specific values from %ENV is supposed to work (i.e. there's code there for it), but it got busted when I instituted "undef", I think. >>Todo. Larry