$test{$_} = [splice @array, 0, 2] for shift @array;