SG wrote:
I use the %ENV to access the environment variables. I came across the
following problem. When I change the environment variable from command
line, i.e
let us say origianlly env var $FOO was bar1, now I do setenv FOO bar2
so $FOO is now bar2
it is not reflected when I access it from perl (which still says that
$ENV{FOO} is bar1). Sometimes it takes a re-login to solve this
problem. Is there an elegant way to solve this?
The problem sounds more like your shell than perl.
When I want to know what my exported environment looks like, I trust
the "env" command. If your setenv FOO bar2 is working, "env | grep
FOO" should show "FOO=bar2". If it doesn't, then I would recommend
going to a newsgroup/website dedicated to your shell environment. If
env does report the changed FOO, perhaps a snippet of code that
reproduces the problem might be in order?
Sorry I can't be more help - I use bash/sh/ksh rather than csh/tcsh.
----- End forwarded message -----