in reply to Perl TK : Looping script to call perl procedure

Never use while(1) loops or sleep in a gui app, unless you really know what you a doing. What you want to do is use a timer
my $id = $mw->repeat( $sleeptime, \&check_status); # sleeptime is in milliseconds, so 1000 = 1 second # later to cancel it $id->cancel;

I'm not really a human, but I play one on earth Remember How Lucky You Are

Replies are listed 'Best First'.
Re^2: Perl TK : Looping script to call perl procedure
by srivasva (Novice) on Jan 21, 2009 at 18:04 UTC
    Awesome... Thanks very much,this is what I was looking for. Thanks for your help.