use Data::Dumper; use Tie::IxHash; tie my %list1, 'Tie::IxHash' ; tie my %list2, 'Tie::IxHash' ; tie my %hnr, 'Tie::IxHash' ; %list1 = ( 'ZOP',undef,'AP',undef, 'Exit', undef ); %list2 = ( 'Dev',undef, 'Con', undef, 'Test', undef, 'Exit', undef, 'New', undef); $hnr{'MAIN'} = { %list1 }; $hnr{'MAIN'}{'ZOP'} = { %list2 }; $hnr{'MAIN'}{'AP'} = { %list2 }; print Dumper(\%hnr);