in reply to Re^2: Using a scalar as a constant?
in thread Using a scalar as a constant?
Ah. If you have
my $style = 'wxTE_MULTILINE';
and want to get at the value returned by the constant/function wxTE_MULTILINE, then you have to use eval:
print $style; $style = eval $style; die $@ if $@; print $style;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: Using a scalar as a constant?
by JavaFan (Canon) on Oct 15, 2008 at 14:10 UTC | |
by suaveant (Parson) on Oct 15, 2008 at 14:22 UTC | |
by JavaFan (Canon) on Oct 15, 2008 at 15:24 UTC | |
by chromatic (Archbishop) on Oct 15, 2008 at 17:27 UTC | |
by suaveant (Parson) on Oct 15, 2008 at 16:09 UTC | |
Re^4: Using a scalar as a constant?
by Anonymous Monk on Oct 15, 2008 at 13:56 UTC |
In Section
Seekers of Perl Wisdom