in reply to Parsing a Text File 2

last if /^[A-Z ]+$/;#or
last if /^[A-Z][^|]*$/;