#!/usr/bin/perl use Tk; use Tk::ExecuteCommand; my $mw = MainWindow->new; $ec = $mw->ExecuteCommand( -command => '', -entryWidth => 50, -height => 10, -label => '', -text => 'Execute', )->pack; $ec->configure( -command => 'dir' ); $ec->execute_command; $ec->bell; $ec->update; MainLoop;