in reply to Re: Reading a file with 8kB long lines
in thread Reading a file with 8kB long lines

First of all: ++. Then (I wanted to /msg you, but it resulted to be longer than expected, so:)

$ perl -le 'open FOO, "file.txt"; print length $_ for (<FOO>);'

Ok, they're just ten lines so it doesn't make a difference, but we recommend people all the time not to slurp files in all at once if possible and since we're talking about oneliners anyway, I would rewrite them like thus:

$ perl -le 'print "A" x (9000 + $_) for 1..10' > file.txt $ perl -lpe '$_=length' file.txt 9001 9002 9003 9004 9005 9006 9007 9008 9009 9010