GeneBean
09/06/2025, 1:56 AM$vlans = [ '1', '2', '3' ]
$vlan_1_data = {stuff}
$vlan_2_data = {stuff}
$vlan_3_data = {more stuff}
Is there a way to compose the variable name while doing something like this:
$vlans.each |$v| {
$blah => {
'ip' => '1.2.3.4',
'data => $vlan_${v}_data,
}
I can't imagine that data => $vlan_${v}_data is correct, but is there a way to do that where the variable is made up of fixed_string_$variable_fixed_string?