use strict; use warnings; use Tk; use Tk::DialogBox; my $mw = MainWindow->new; my $dialog = $mw->DialogBox ( -title => "Please pick one of the three", -buttons => ["One", "Two", "Three"]); my $item = $dialog->Show(); print "Returned from the show, got $item\n";