Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 173
  • Last Modified:

where did that person come from?

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
john1998
Asked:
john1998
1 Solution
 
feenixCommented:
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
 
greCommented:
this will type out your ENV variables and their values:

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

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now