I am using Perl together with a Tcl GUI interface (use Tcl::Tk). I want to bind a lot of widgets (checkbuttons) that all go by the same statement:
my $widgetVariable;
my $widgetName=$windowName->widget("widgetName");
$widgetName->configure(-variable=>\$widgetVariable);
This binds the widget...
I have an array of strings @array=("Checkbutton","Label",...) and I want to declare corresponding variables $Checkbutton, $Label automatically.
I tried the declaration my ${$array[i]}, but this gives an error "Can't declare scalar dereference...".
Any suggestions?
Thanks for your help!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.