use strict; use warnings; use diagnostics; use Tk; my $Columns_per_Row = 12; sub ASCII_Buttons { my $root = MainWindow->new(); $root->title('Tk ASCII Table'); my ($row,$col) = (1,1); for my $character (0..255) { my $label = sprintf("[%03d][%s]", $character, chr($character)); $root->Button ( -text => $label, -font => '-*-Lucida Console-Bold-R-Normal-*-*-160-*-*-*-*-*-*', )->grid ( -row => $row, -column => $col, -sticky => 'nswe' ); if ($col >= $Columns_per_Row) { $row++; $col = 0; } $col++; } } ASCII_Buttons(); MainLoop;