Solved

where did that person come from?

Posted on 1998-08-21
2
160 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
Comment Utility
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
Comment Utility
this will type out your ENV variables and their values:

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

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
json encode mysql results 4 182
Perl Tutorial 6 125
Input from stdin for perl 6 108
Perl Write to Specific line in a file 15 50
I've just discovered very important differences between Windows an Unix formats in Perl,at least 5.xx.. MOST IMPORTANT: Use Unix file format while saving Your script. otherwise it will have ^M s or smth likely weird in the EOL, Then DO NOT use m…
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…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

772 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