Solved

Get user environment variable in perl

Posted on 2008-10-07
5
1,346 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

No single Antivirus application (despite claims by manufacturers) will catch or protect you from all Virus / Malware or Spyware threats. That doesn't stop you from further protecting yourself however - and this article is to show you how.
This article summaries thoughts and ideas from two years of sustained use. It provides good reasoning to make the jump to Windows 10.
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

734 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