in reply to Re: Thrashing on very large lines
in thread Thrashing on very large lines
But if I save it to a script it works nicelyUndefined subroutine &main::x called at -e line 1. BEGIN failed--compilation aborted at -e line 1.
$_ = '-' x (1024*1024*300); while( <> ) { print and next if length($_)==1001; print STDERR $_; }
The odd thing (to me) is that it converts the line endings from Unix to Windows.. I didn't think it would that without using "\n" in the print.perl maxwellsfilter.pl suspect.txt > goodrecs.txt 2> badrecs.txt
Also, I now realize that with $|++ it did write complete records, but because it converted the line endings the record length changed from 1001 to 1002.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Thrashing on very large lines
by salva (Canon) on Apr 20, 2006 at 18:51 UTC | |
by chr1so (Acolyte) on Apr 24, 2006 at 23:34 UTC |