[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Get user environment variable in perl

Posted on 2008-10-07
5
Medium Priority
?
1,362 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
3 Comments
 
LVL 48

Accepted Solution

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

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

Assisted Solution

by:Adam314
Adam314 earned 1000 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows how to use a free utility called 'Parkdale' to easily test the performance and benchmark any Hard Drive(s) installed in your computer. We also look at RAM Disks and their speed comparisons.
It is a real story and is one of my scariest tech experiences. Most users think that IT experts like us know how to fix all computer problems. However, if there is a time constraint and you MUST not fail the task or you will lose your job, a simple …
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…

834 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