in reply to Re: How ro read a file every 10 seconds?
in thread How ro read a file every 10 seconds?

Thanks I will look this up

really apreciated :)
  • Comment on Re^2: How ro read a file every 10 seconds?

Replies are listed 'Best First'.
Re^3: How ro read a file every 10 seconds?
by Anonymous Monk on May 12, 2008 at 21:13 UTC

    Or you can set a repeat on the main window.....

    use Tk; my $SLEEP = 1000; # msec my $mw = new MainWindow; $mw->title('Clock'); my $text = $mw->Text( -width => 25, -height => 2 )->pack; $mw->Button( -text => " Start! ", -command => sub { $mw->repeat($SLEEP,\&change_label) } )->pack; MainLoop; sub change_label { $text->delete('1.0','end'); $text->insert('end', (scalar localtime) ); };