This is the first chunk. // This is the second chunk. // This is the third chunk. // #### $/="//\n"; $count_records=0; open OUT1, ">>0_999"; open OUT2, ">>1000_2000"; open OUT3, ">>2001_3000"; while(<>) { $record=$_; $count_records++; } #### "If $count_records<=999 --> print OUT1 $record"
"If 1000<=$count_records<=1999 --> print OUT2 $record"
"If 2000<=$count_records<=2999 --> print OUT3 $record"