in reply to Use hash variable as constant

Update: No. Assuming the YML file had INTEGER in it, then $snmpConf->{$oid}{type} will just be the string "INTEGER". I think your idea to eval it should work.

Maybe:

($snmpConf->{$oid}{type} + 0);

Replies are listed 'Best First'.
Re^2: Use hash variable as constant
by Virus2500 (Initiate) on Jun 27, 2014 at 19:29 UTC
    Wow thanks to all for your great support.

    I will dig trough the documentation and source a little bit more.
    I kinda a thought this might be something "well known" and i am just not aware of it :)

    However the method i posted with eval is working a treat (if anyone is having the same issue in the future.)

    thanks again and br Mike