push @returnarray, [splice(@$arrayref,$count, ($count+$size-1<=@$arrayref)? $count+size-1 :@$arrayref )];