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