Probably would just be easier to use 'eq' instead of '=', but qw works. I was half
asleep when I did that...I'd be amazed if everything was right the first time. :)
Thanks
SR
-----Original Message-----
From: drieux [mailto:[EMAIL PROTECTED]]
Sent: Sunday, May 26, 2002 11:03 AM
To: Scot Robnett
Cc: Sebastian Nerz; [EMAIL PROTECTED]
Subject: Re: Checking who called a cgi-script
On Saturday, May 25, 2002, at 08:18 , Scot Robnett wrote:
> # Compare the referer against your "good list"
> for $domain(@good_domains) {
> if ($domain = $referer) { # If the referer matches a
> $good_one = "success"; # domain in your list, set
> last; # $good_one as "success" and
> } # skip looking at the rest of
> } # them since we found a good one
there may be a problem here - since you are setting up a
list of 'strings' - and trying to do a numeric compare here.
You would of course wish to extend your
my @good_domains = qw/domain1.com theIpAddrFor_domain1.com
www.domain1.com theIpAddrFor_www.domain1.com
domain2.com theIpAddrFor_domain2.com
www.domain2.com theIpAddrFor_domain2.com /;
since it is possible that
my $referer = $ENV{'REFERER'};
may return the dotQuad internet IP address form....
ciao
drieux
---
ok, so I am a freak for qw/<list_oh_stuff_without_quotes_or_comma>/;