in reply to Re^2: Verbose Tk Code
in thread Verbose Tk Code
I've lately been doing things like this
$mw->Button(-text => $_->[0], -command => $_->[1], -font => 24, )->pack( -side => 'left', -fill => 'x', -expand => 1) for [Restart => \&restart], ['Previous State' => \&previous], ['Random Move' => \&random], [Help => \&help], [Exit => sub {$mw->destroy}];
which is a section from my chess player on RosettaCode https://rosettacode.org/wiki/Chess_player#Perl
and I probably would do the same kind of thing for those five Labels.
One might consider for to be a perl approximation of with :)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Verbose Tk Code
by LanX (Saint) on Feb 28, 2021 at 20:52 UTC |