GeneBean
09/05/2025, 7:17 PM$isp_vlans = {
'isp1' => '10',
'isp2' => '11',
}
I want to loop over that doing something like this:
$_all_isps = {}
$isp_vlans.each |$isp, $vlan| {
$_all_isps[$isp] = {
'vlan' => $vlan,
'ip' => lookup("inet${vlan}_ip", Optional[Stdlib::IP::Address::V4::Nosubnet], 'first', undef),
}
}
Doing so results in Illegal attempt to assign via [index/key]. Not an assignable reference pointed at $_all_isps[$isp] = { line. What am I doing wrong here? I am sure it is just a facepalm moment but I am not getting it today.