in reply to Where does %ENV come from?

%ENV does come from the environment. But that doesn't mean that the environment you see from the shell is the same environment as perl sees. While not common, C libraries can add things to the environment as they initialize, as can perl extensions and if your old perl is statically linked to things (I'd suspect at least Java in some form or fashion from the output) then that may well be where they're coming from. Check your old perl to see what extensions are in statically.

Replies are listed 'Best First'.
Re: Re: Where does %ENV come from?
by permanentE (Acolyte) on Jul 30, 2003 at 21:19 UTC
    Thanks, but this brings up a lot more questions: How can I check my old perl for static extensions? How do you compile static extensions into perl? In general how could you compile environment variables into perl. ps. It's not a wrapper
      To see what has been built in statically, take a look at Config's static_ext setting. This command line'll do that:
      perl -MConfig -e 'print $Config{static_ext}'
      It'll be empty, or perhaps have a dl* entry of some sort in it. If there's anything else, well, you have static extensions built in.

      You don't compile environment variables into perl, rather you compile in modules that, at initialization time, set keys in %ENV. If you built in Foo, say, the Foo boot code, which is executed when the module is initialized (which for statically built modules is when perl is started), can put things in %ENV.