cocoon has asked for the wisdom of the Perl Monks concerning the following question:
But refering to the hash variable using $i doesn't work it seems...Is there a a way to make it work like i want or?my %varbindhash0; my %varbindhash1; my %varbindhash2; my %varbindhash3; my %varbindhash4; my %varbindhash5; my $i = 0; while ($i < @OIDs) { $varbindhash$i{OID} = $OIDs[$i]; $varbindhash$i{OID_value} = $OID_VALUEs[$i]; $varbindhash$i{OIDs_data_types_id} = $OIDs_DATA_TYPEs_ID[$i]; $varbindhash$i{OIDs_data_types} = $DATA_TYPEs[$i]; $i++; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: refering to a variable by using other variables
by AppleFritter (Vicar) on Jul 21, 2014 at 12:22 UTC | |
by Anonymous Monk on Jul 21, 2014 at 12:41 UTC | |
by Athanasius (Archbishop) on Jul 21, 2014 at 12:50 UTC | |
by roboticus (Chancellor) on Jul 21, 2014 at 14:12 UTC | |
by Anonymous Monk on Jul 23, 2014 at 13:32 UTC | |
by AppleFritter (Vicar) on Jul 21, 2014 at 12:48 UTC |