my $button1 = $mw->Button(-text => "18-Letters", -command => sub {print OUTFILE "18L\n"}, -command => \&change)->pack(-side => "top"); sub change { $button1->configure(-background=>"yellow") } #### my @btn = $button1-$button28;