On Thu, 7 Jun 2001, Luinrandir Hernson wrote:

> anycare to help get this working.
> it is being called from a homepage as the page loads (like a counter would be used)
>
> #!/usr/bin/perl -w
> use strict;
> use diagnostics;

This is all good.

> print "Content-type: text/html\n\n";
>
> ##############
> ##declared variables
> ##############
> my $homepage;
> my $ENV;
> my $HTTP_REFERER;

Nope.  %ENV, a hash, is already available to you.  You don't need to
declare these at all.

> ## print to webpage
> ##############
> ##print "$_:  $ENV{$_}<br>\n" foreach keys %ENV;
> print "$ENV{'$HTTP_REFERER'}\n";

If you are using %ENV, you want $ENV{HTTP_REFERER} here.  The way you have
it coded, you are trying to retrieve a value with the
literal string '$HTTP_REFERER', which won't yield a value at all.

-- Brett

Brett W. McCoy
Software Engineer
Broadsoft, Inc.
240-364-5225
[EMAIL PROTECTED]

Reply via email to