local $/ = \4096; while (<$fh>) { # $_ contains one 4k chunk ... }