in reply to Performance challenges
Note: awk processing a million rows/minute probably isn't that bad. I'm not sure Perl is going to be much faster. This is a very I/O-bound activity.open( IN, '<', "Your_data_here" ); open( GOOD, '>', "Good_file_here" ); open( BAD, '>', "Bad_file_here" ); while (<IN>) { my @row = split "\t", $_; if ( length($row[14]) == 5 && length($row[15]) == 7 ) { print GOOD $_; next; } print BAD $_; } close BAD; close GOOD; close IN;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Performance challenges
by Eimi Metamorphoumai (Deacon) on Mar 22, 2006 at 18:24 UTC | |
|
Re^2: Performance challenges
by Anonymous Monk on Mar 22, 2006 at 13:31 UTC |