in reply to Creating Variables On The Fly
Please make sure to Dominus' archived newsposts, part one, two and three on Why it's stupid to 'use a variable as a variable name'. Also, I suggest you make use strict; use warnings; a habit.my %button; for my $label (qw/BUTTON1 BUTTON2 BUTTON3/){ $button{$label} = $mainwindow->Button(-text => $label)->pack(); }
Makeshifts last the longest.
|
|---|