The question is - why?
Homework?
In reply to Re^2: Array to nested hash by Mutant in thread Array to nested hash by amw1