#!/usr/bin/perl use warnings; use strict; use Tk; my $mw = new MainWindow; $mw->withdraw; $mw->repeat(1000, \&launch); MainLoop; sub launch{ system( "date" ); }