while (defined($_ = )) { print $_ if $. == 2 or $& and not $s++; $. = 0 if /^-+$/; }