for ($test_num.. int((($#all_stores+3)/1000)+1)) { #3 to account for 998 1998 and 2998 push(@{$store_get_dist[$_]},$new); }