if(..) { open my $fh, "<", $filename or die &cant_open_file; local $/ = \8192; # read in 8 kbyte chunks rather than line by line print while <$fh>; }