in reply to Re^2: Perl IF Issuein thread Perl IF Issue
Do a chomp $HOSTNME; prior to the if statement. That variable has an attached newline (\n) at the end if it.
Update: See perldoc -f chomp to understand the purpose of chomp.
-stevieb