in reply to $_ and nested while loops w/angle operator

You didn't assign to $_ in the second loop. The form while(<FH>) is special cased to while( defined( $_ = readline *FH ) ). When you didn't write it that way the assignment wasn't done for you.