while (<>) { if (?^$?) { # blank line between header and body ... } } continue { reset if eof; # clear ?? status for next file }