You are correct. This is an artifact of having the logical statement in the conditional. while (<FH>){} does assign the line to $_. However, while (<FH> and some condition){} doesn't assign the read line to $_ only the "truthiness" of whether a line was actually read or not is used (the line itself is thrown away). Ok, we have found yet another reason why this odd looking while statement won't work. while (defined (my $line =<FH>) and some condition){} is perhaps better. It is possible to assign to $_ (left hand side), but I seldom do that. This whole idea of an "and" or "&&" statement in the while condition looks dubious to me. | [reply] [d/l] [select] |