Help for this page

Select Code to Download


  1. or download this
    my $nmbr = $mw->Entry(-width => 10, -text => 10);
    
  2. or download this
     #!/usr/bin/perl -w
        use Tk;
    ...
            (my $value) = @_;
            print "Printing number $value\n";
        }
    
  3. or download this
        $mw->Button(
            -text => 'Randomise',
            -command => sub{do_randomise(\$value);}
            )->pack;
    
  4. or download this
        sub do_randomise
        {
            (my $value) = @_;
            $$value = int rand 100;
        }