On Jun 9, Jos I. Boumans said:
>$ENV{'HTTP_REFERER'} : $previous = $ENV{'HTTP_REFERER'} ? $previous = "an
>unknown site";
You didn't test that. Perl parses your code:
$a ? $b = $a : $b = $c;
as
(($a ? ($b = $a) : $b) = $c);
So that $b gets $c assigned to it no matter what. Either parenthesize the
assignments, or move $previous to the left-hand side of the expression:
$b = $a ? $a : $c;
or just do:
$b = $a || $c;
--
Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/
I am Marillion, the wielder of Ringril, known as Hesinaur, the Winter-Sun.
Are you a Monk? http://www.perlmonks.com/ http://forums.perlguru.com/
Perl Programmer at RiskMetrics Group, Inc. http://www.riskmetrics.com/
Acacia Fraternity, Rensselaer Chapter. Brother #734
** Manning Publications, Co, is publishing my Perl Regex book **