#!perl use Tk; @batfile = ( "e:\\document\\local.bat", "e:\\document\\bat\\MakeIndex.bat" ); $font=['MS ゴシック', 11, 'normal']; $mw = MainWindow->new(); $mw->title("Namazu"); $rad1 = $mw->Radiobutton(-text => "Tradeone", -variable => \$value, -relief => 'ridge', -width => 10, -anchor => 'w', -value => "1"); $rad1->pack(); $rad2 = $mw->Radiobutton(-text => "LocalFolder", -variable => \$value, -relief => 'ridge', -width => 10, -anchor => 'w', -value => "0"); $rad2->pack(); $but = $mw->Button(-font => $font, -text => "更新!!", -command => \&callbat); $but->pack(-side=>'bottom'); $rad1->select(); MainLoop; sub callbat{ system("$batfile[$value]"); }