Solved

Get user environment variable in perl

Posted on 2008-10-07
5
1,311 Views
Last Modified: 2012-08-14
Hi,
I was able to get all my SYSTEM path variable paths through $ENV{'PATH'};
How can I get USER environment variable paths as well Perl's path variable?
0
Comment
Question by:nopopo
  • 2
5 Comments
 
LVL 48

Accepted Solution

by:
Tintin earned 250 total points
ID: 22662857
You can access an environment variable with

$ENV{'environment-variable-name'}
0
 
LVL 39

Assisted Solution

by:Adam314
Adam314 earned 250 total points
ID: 22663591
The only difference between the SYSTEM and USER environment variables is the SYSTEM ones are set for everybody, and the USER ones are set by user.

The $ENV{variable} will give you both SYSTEM and USER environment variables.
0
 
LVL 48

Expert Comment

by:Tintin
ID: 24470165
recommend points split.
0

Featured Post

Want to promote your upcoming event?

Attending an event? Speaking at a conference? Or exhibiting at a tradeshow? Easily inform your contacts by using a promotional banner in your email signature. This will ensure your organization’s most important contacts are in the know.

Join & Write a Comment

If you get continual lockouts after changing your Active Directory password, there are several possible reasons.  Two of the most common are using other devices to access your email and stored passwords in the credential manager of windows.
When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup". After a while, you have entered a loop for Auto repair which does not fix anything and you will be in a  panic as all your work w…
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now