in reply to Trying to understand the 'use constant' pragma

You could use symbolic references, but don't do that. I'd probably use a hash array instead of constant if I were going to store this sort of stuff in a config file.

An alternative is to use the string as a method to the package where the constants are defined, e.g.:

package Foo; use constant LOG_DEBUG => 0; package main; my $log_level = 'LOG_DEBUG'; print Foo->$log_level, "\n";