Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I'm creating an app using wxperl and would like to use scalars to define my styles which are constants. For instance if creating a TextCtrl the code would look something like this:
I'm unable to use a scalar in place of wxTE_MULTILINEWx::TextCtrl->new( $self, -1, "", [5, 10], [-1, -1], wxTE_MULTILINE );
I've tried the following:
Is this even possible? If so what am I doing wrong?use vars qw($constantstring); my $style = 'wxTE_MULTILINE'; *constantstring=\"$style"; Wx::TextCtrl->new( $self, -1, "", [5, 10], [-1, -1], $style );
Thanks
Back to
Seekers of Perl Wisdom