473,386 Members | 1,790 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Environment vars

SG
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?
SG

----- End forwarded message -----
Jul 19 '05 #1
1 3084
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 -----
Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: james | last post by:
I am new to php and need some help getting the session variables into include files. (after-thought, Sorry for the drawn out post but I really, really need help....;) Here's what I'm doing.. ...
5
by: Rafal Kleger-Rudomin | last post by:
Hello, I'm looking for a command to reset interpreter's environment i.e. unload all modules, delete variables etc. Regards, Rafal
11
by: Stanley Sinclair | last post by:
How do I find a list of ALL environment variables, their meaning, and their options? Windows 32, v8.1.2 Stan
5
by: Aku | last post by:
Hello, In the 'old-days', WIN32-API/MFC, it is possible to create a temporary key in the registry to satisfy a particular app. It's done with 'SetEnvironmentVariable(name, value)". Once the app...
0
by: Daryl | last post by:
I have long had a c# service that launches a process. My understanding is thus: A: The service will contain the environment of the last boot of the server. B: Any process ENV vars put in...
0
by: Peter Steele | last post by:
I am creating a Visual Studio deployment project for the first time. It seems to be all straightforward except for one thing--how do I define environment vars? I suppose I could add registry...
0
by: mirandacascade | last post by:
Apologies in advance for what I'm guessing may be a trivial question. Assume the following: 1) multi-user environment 2) standard (i.e. not a class module) module with: Public strSample as...
19
RMWChaos
by: RMWChaos | last post by:
Previously, I had used independent JSON lists in my code, where the lists were part of separate scripts. Because this method did not support reuse of a script without modification, I decided to...
0
by: imanuelg | last post by:
Hello, I have a Unix shell script that has lots of env variables setting in it, e.g. : ... export VAR1="var1" export VAR2="var2" ... I would like to access those from Perl using...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.