Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Re: Limit to Line Length?

by mr.nick (Chaplain)
on Jan 26, 2001 at 21:41 UTC ( [id://54580]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://54580]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2024-04-23 18:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found