$T1val = defined ${$main_hash{$val}{$type}{$pegs}{'Section1'}}[0] ? ${$main_hash{$val}{$type}{$pegs}{'Section1'}}[0] : undef;