Help for this page
#!/usr/bin/perl -w # ... print "correct idx[$correct_idx] ... chosen_idx[$chosen_idx]\n +"; } }
sub button { my ($w, $bg, $text, $pcmd, $ival) = @_; ... push @$pbuttons, button($frame, 'skyblue', $dup, $psub, $i); # The above correctly displays each value of $i
my $icopy = $i; # ... my $psub = sub { $chosen_idx = $icopy };