my $rb_frm = $mwt_pckg->Frame()->grid( -sticky => 'w', -column => 1, -row => 2, # -columnspan => 20, # -padx => 50, ); my $package = 'normal'; foreach my $type (qw(normal pckg_A pckg_B)) { $rb_frm->Radiobutton( -text => " $type", -value => $type, -variable => \$package, -command => sub { say $package; }, )->pack (-side => 'left'); #This line to make it horizontal }