in reply to Re: while statement only picks up first line
in thread while statement only picks up first line

Um... lack of efficiency, for sure, but that's the lesser problem in this case. Your approach would involve re-reading the entire input file for each element in @partners, which is bad enough, but then you forgot to "seek FH, 0, 0" after (or before) the embedded while loop that reads the file, so there would be nothing left to read when looking for the second element in @partners.

Doing "grep ..., @partners" for every line of the input file (as suggested in an earlier reply) is also a bit short on efficiency, if @partners has a lot of elements. Based on what the OP seems to be trying to do, a hash would be better than an array:

... print ... if ( exists( $partners{$usernamedb} ));