in reply to Re^3: Using a scalar as a constant?
in thread Using a scalar as a constant?
An eval is possible, but some people rather avoid eval. You can avoid eval by making use of a symbolic reference:
my $style = 'wxTE_MULTILINE'; { no strict 'refs'; say &$style; # or: say $style->() }
In Section
Seekers of Perl Wisdom