while(){ chomp; print OUT "\n" if /^10/; print OUT "$_\n"; }