Solved

where did that person come from?

Posted on 1998-08-21
2
165 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Syslog text file into database or into .CSV 19 136
How to strip .csv from file name 9 81
transpose into pipe delemited 8 67
use google analytics code in perl script 2 76
A year or so back I was asked to have a play with MongoDB; within half an hour I had downloaded (http://www.mongodb.org/downloads),  installed and started the daemon, and had a console window open. After an hour or two of playing at the command …
In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (http://dilbert.com/strips/comic/2007-08…
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…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

786 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