in reply to Re: Limit to Line Length?
in thread Limit to Line Length?

Good idea! I just wrote the following and am executing it as we speak (it's at 1_400_000 right now):
#!/usr/bin/perl my $l=600_000; while (1) { print "\rTesting $l..."; open OUT,">biglines.txt" || die; print OUT "x" x $l; close OUT; open IN,"<biglines.txt" || die; my $r=<IN>; close IN; if (length($r)!=$l) { print "Oops! A linelength of $l fails!!\n"; exit; } $l+=5000; }
It doesn't have good resolution, but it would take it years to try all the possible lengths.

(12:01pm EST) Addendum: well, it's up to 25_000_000 characters on a line and still no problems!

(2:28pm EST) Well, I finally stopped it from executing at approximately 65MB per line :) At this point I'd say that there is no theorectical line-length-limit, at least under Linux. I would be interested, though, to see if Perl under NT lacks the same limitation.