$ 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