my %hash = map +($_->{id_1} => { $_->{id_2} => $_->{v} }), @aoh; #### my @aoh = ( { id_1 => "F1", id_2 => "F2", v => "FV" }, { id_1 => "S1", id_2 => "S2", v => "SV" }, { id_1 => "T1", id_2 => "T2", v => "TV" }, { id_1 => "T1", id_2 => "T3", v => "TW" }, ); #### use Data::Diver qw{ DiveVal }; my %hash; DiveVal(\%hash, @$_{qw{ id_1 id_2 }}) = $_->{v} for @aoh; #### ($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,