#!/usr/bin/perl -w use strict; use Tk; my $page2; my $w=0; my $wtf; my $wentry= 3; my $wcb; $page2 = MainWindow -> new(); $wcb = $page2 ->Checkbutton (-text=> '/W:', -variable=> \$w, -font=>"Adobe 10")->pack; #$wcb->select(); $wtf = $page2 ->Entry (-textvariable=> \ $wentry, -width=>8, -validate=> 'key', -validatecommand=> sub{$_[1] =~/[0-9]/}, -invalidcommand=> sub{$page2->bell} )->pack; MainLoop; #### -validatecommand=> sub{$_[1] =~/[0-9]/},