my $buffer = chr(0) x 4800; ## Pre-partition the data using lvalue refs my $header = \substr $buffer, 0, 300; my @subs = map{ \substr( $buffer, 300 + $_ *18, 18 ) } 0 .. 249; while( read( $fhTest, $buffer, 4800, 0 ) == 4800 ) { ... }