If we don't use explicit variables in nested while loops, then $_  will be
overwritten in the inner loop.
