{ use bytes; local $/ = \1048576; open my $fh, '<', 'bigfile.bin' or die $!; while (<$fh>) { # stuff the db } }