vikee has asked for the wisdom of the Perl Monks concerning the following question:
Hello,
simple question again: I want to create arrays in a foreach cycle but always something wrong:
$i = 0; foreach $tab (@tabs) { j = 0; foreach $frnum (@FRs) { $tmp = $tab->Checkbutton(-text => $frnum, -variable => \@tab$i[$j], -command => sub { } )->pack(-side => 'top', -anchor => 'nw'); $j++; } i++; }
I want to create for each tab an array called tab1, tab2, etc that this array could contain all the checkbox variables.
help me, I'm very new. thnaks
Edited by Chady -- fixed formatting.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: variables
by hbo (Monk) on Jul 20, 2004 at 14:25 UTC | |
|
Re: variables
by bgreenlee (Friar) on Jul 20, 2004 at 14:32 UTC | |
|
Re: variables
by ambrus (Abbot) on Jul 20, 2004 at 16:33 UTC |