Solved

where did that person come from?

Posted on 1998-08-21
2
163 Views
Last Modified: 2012-05-04
Can anyone tell me how to access enviroment variables? I am new to this perl stuff and was wanting to access an env var that told me where a person came from (what url).

For extra points, can you also tell me where I can find a definitive list of ALL environment variables that can be accessed with perl scripting?

ta
0
Comment
Question by:john1998
2 Comments
 
LVL 4

Expert Comment

by:feenix
ID: 1204440
You can access environment variables with $ENV{}-statement. The URL which the user came from can be found in $ENV{'REFERRER_URL'} if the browser sends it.
0
 

Accepted Solution

by:
gre earned 50 total points
ID: 1204441
this will type out your ENV variables and their values:

foreach $key (sort keys %ENV) {
     print "$key=ENV{$key}\n";
}
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Perl - Mawk 2 87
Perl strange behaviour 5 69
Exchange 2010 Transport Rule Regex 28 96
Perl DBI Transactions Using Custom Module 7 45
On Microsoft Windows, if  when you click or type the name of a .pl file, you get an error "is not recognized as an internal or external command, operable program or batch file", then this means you do not have the .pl file extension associated with …
Many time we need to work with multiple files all together. If its windows system then we can use some GUI based editor to accomplish our task. But what if you are on putty or have only CLI(Command Line Interface) as an option to  edit your files. I…
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…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

863 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

20 Experts available now in Live!

Get 1:1 Help Now