Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

is there any way to get the referal URL of a script and store it as a variable?

Replies are listed 'Best First'.
(chromatic) Re: referal url
by chromatic (Archbishop) on Jul 21, 2000 at 00:48 UTC
    Yes, the following code works. However, realize that many clients can block the referring URLs. Relying on that for security is a poor idea. (You may not be doing this, but other people might read this answer who don't already know it.) my $referer = $ENV{HTTP_REFERER};
Re: referal url
by infoninja (Friar) on Jul 21, 2000 at 00:49 UTC
    You can use $ENV{'HTTP_REFERER'}, although it's easily forge-able.