in reply to How can I reference a hash value with an array

Ahem ...
my %hash = { $_ => (\&{$_})->() } qw( INTEGER INTEGER32 OCTET_STRING OBJECT_IDENTIFIER IPADDRESS COUNTER COUNTER32 GAUGE GAUGE32 UNSIGNED32 TIMETICKS OPAQUE COUNTER64 );
So now you'll have a hash where the keys points to their corresponding constant values.
HTH

_________
broquaint