Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
use Tk;
my $count = 0;
my $loop = 0;
my $mw = new MainWindow();
$mw->Label(-textvariable => \$count)->pack;
$mw->Button(-text => 'Start', -command => \&long_job)
->pack(-side => 'left');
$mw->Button(-text => 'Stop', -command => sub { $loop = 0 } )
->pack(-side => 'left');
MainLoop();
sub long_job
{
$loop = 1;
while($loop)
{
$count++;
DoOneEvent();
}
}