#! perl use strict; use warnings; use Getopt::Long; use Tk; my ($i, $d, $o); GetOptions ("i=s" => \$i, "d=s" => \$d, "o=i" => \$o) or die "Error in command line arguments: $!"; my $mw = MainWindow->new; $mw->Label(-text => "$i #$o")->pack; $mw->Button ( -text => $d, -command => sub { exit }, )->pack; MainLoop; #### >wperl 1374_SoPW.pl -o 42 -i Title -d Quit