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 12:56 PM Subject: Problem testing variable > open (RSTDATA, "rst/r".$event.".rst")|| print "Oops"; > $winner = <RSTDATA>; > if ($winner eq "na") > { > print "Finalists<br>Did Not Play"; > } > else > { > print $winner; > } > > Why does the above code always print the value of $winner, and never > Finalists<br>Did Not Play, even when the line of text in the file is > just the letters na? > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]