if(ref $Log_names{BM_light_test_00_} eq 'HASH' && exists($Log_names{BM_light_test_00_}{device_log})) { print "Exists\n"; }