do { local $/ = "fieldname"; <$fh> }; # read through "fieldname" #### my $header_line = "fieldname" . <$fh>; # complete the line