You can walk up the hash using a placeholder $hashref
:
my $hashref = \%deviceSettings;
$hashref = $hashref->{$_} for qw(BB EUTRA DL PLCI);
$hashref->{CID} = 'My New Path';
use Data::Dump;
dd \%deviceSettings;
Outputs:
{
BB => {
EUTRA => {
DL => { CPC => "NORM", PLCI => { CID => "My New Path" }, ULCPc => "NORM" },
UL => {
REFSig => { DSSHift => 2, GRPHopping => 1, SEQHopping => 1 },
SOFFset => 0,
},
},
},
}