my $chunk = 1073741824; #1gb [...] #- read an output file worth of data $sizeRead = read $in_fh, $buffer, $chunk;