Hofmator,
With your latest code, but using my very first array @nlist = (0,1,2,3,4,5,6,8,10);.
It gives this:
A => [0 1] # <--- give extra hash, why? B => [0 1 2] C => [1 2 3] D => [2 3 4] E => [3 4 5] F => [4 5 6] G => [5 6] H => [8] I => [10]
[download]