in reply to run command every x seconds

See sleep for delaying.

But if I were you I'd have a look at tail -f and it's pure Perl equivalents.

Cheers Rolf

( addicted to the Perl Programming Language)

update

Did you update the TK part of your question?