$/ = \16384; # 16 KB/read while () { print; } # It's not a problem if the last "record" read from FILE is <16 KB.