#!/usr/bin/perl # http://perlmonks.org/?node_id=1191710 use strict; use warnings; use Tk; my $count = 0; my $mw = MainWindow -> new; $mw -> Label(-text => 'Counter') ->pack(); $mw -> Label(-textvariable => \$count ) ->pack(); $mw -> Button( -text => 'Count', -command => sub { $count++ } ) ->p +ack(); MainLoop;
In reply to Re: simple tk counter
by tybalt89
in thread simple tk counter
by dezboi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |