while (my $line =) { my ($one,$two,$three,$four,$five) = split "\t",$line; if ($three eq $checkthree) { print "

With matching parameters I should be able to see this

"; last; } else { print "

If I put the else statement in it ignores the fact that the parameters match - and comes here! (But I don't know why).

"; last; } }