You may want to cycle through the file, line by line:
while(){
chomp;
if( . . .
}
}
That should do it.
-Original Message-
From: Glenn Cannon [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 05, 2002 3:57 PM
To: [EMAIL PROTECTED]
Subject: Problem testing variable
chomp($winner) before your if statements. or do if ($winner eq "na\n")
Agustin Rivera
Webmaster, Pollstar.com
http://www.pollstar.com
- Original Message -
From: "Glenn Cannon" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, April 05, 2002 1
day, April 05, 2002 3:57 PM
> To: [EMAIL PROTECTED]
> Subject: Problem testing variable
>
>
> open (RSTDATA, "rst/r".$event.".rst")|| print "Oops";
> $winner = ;
> if ($winner eq "na")
> {
> print "FinalistsDid Not Play&q
open (RSTDATA, "rst/r".$event.".rst")|| print "Oops";
$winner = ;
if ($winner eq "na")
{
print "FinalistsDid Not Play";
}
else
{
print $winner;
}
Why does the above code always print the value of $winner, and never
FinalistsDid Not Play, even when the line of text in the file is
just the letters