%hash = map (s/\s//g, $_->[1]{item1} => $_->[1]{item2})@{$ref->{array}};