Help for this page

Select Code to Download


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