my $diffs = diff( ... ); while( length( $diffs ) ) { my( $x, $y ) = unpack 'VV', substr( $diffs, 0, 8, '' ); ## use em. }