my $p = 0; substr( $bigstring, $p, 4 ) = pack 'J', .. $p += 4;