Access to OS Environment Variables

  • Jean-Louis

    Jean-Louis - 2004-07-15

    Is there a way of passing environment variables to the perl script execution within Eclipse?

    Typically, I'd like to have sthg like this in my script:

    use Env;
    my $XYZ = $ENV{"XYZ"};


    • Ben Imp

      Ben Imp - 2004-07-20

      perldoc env

      or is that not what you are looking for?

    • Anonymous - 2004-08-04


      I think you have the same problem as i.

      I need to have the _complete_ environment from the
      os in the the %ENV hash (perl standard)

      if you have a program, say "" with the code of
      print $ENV{'PATH'};

      this will show the PATH Environment on the console (normaly something like "/bin:/usr/bin:/usr/local/bin:..."

      but if you run the same program out of the epic / eclipse plugin you won't get any output, because the
      %ENV Hash is empty / not set, so the program is started without any OS-Environment, which is the root cause.

      The question is now, is there any possibility to give the epic/eclipse an environment _before_ starting the perl program out of eclipse?

      if that is possible that would be the solution.

      (In my case, i need to set the LD_LIBRARY_PATH Envirionment before running the perl program...)

      thanx a lot!


      • Jean-Louis

        Jean-Louis - 2004-08-04


        This is exactly the problem.  I haven't found any solution, and I am not sure there is one at the moment.  I have resorted to using komodo (  It is buggy but it does load up the environment that is set up before you invoke it.  You can also modify it afterwards.

        If you happen to find a solution re. epic, I'd be interested.


        • Jochen Ruehl

          Jochen Ruehl - 2004-08-04


          setting environment variables is on our TODO list.
          It will be implemented the way it now works for running/debugging CGI scripts.
          But don't expect it too soon, because Stephan (the developer of the debugger) is on vacation for two weeks.


    • Anonymous - 2004-08-05


      Well, that's good to hear!
      Tell him a happy holiday!


      For now, I copy the rquired .so libraries in some Solaris-Standarpaths, which isn't system conform, but works.... (very dirty..)

  • Will

    Will - 2011-06-06

    Six years later and this is still a bug.
    Did Stephan ever come back from that holiday?


Log in to post a comment.