An option; probably too heavy on the idiom but that’s why it’s fun; for me. :P There are a few others with modern CSS. This is fragmentary HTML—it should be loaded properly in a full page—but it's just for example and modern browsers don't care. <td></td> has caveats in older browsers and maybe IE still for all I know but I will never launch that without being paid. You can put a in it if necessary but using whitespace to control HTML layout is painful to even suggest. :P
#!/usr/bin/env perl
use 5.16.0;
use utf8;
use strictures;
use open ":std", ":encoding(utf8)";
print <<"";
<style>
table {
border:0;
border-collapse:collapse;
}
td {
font-weight:700;
text-align:center;
line-height:200%;
font-size: 150%;
border:2px solid black;
width:2em;
height:2em
}
td.fill {
background-color:black;
}
</style>
chomp( my @rows = <DATA> );
say "<table>";
for my $row ( @rows )
{
say " <tr>";
for my $col ( split //, $row )
{
say $col =~ /\w/ ?
" <td>$col</td>"
:
" <td class='fill'></td>";
}
say " </tr>";
}
say "</table>";
__DATA__
л лесопарк
о и о о е
комар р й
л б трасса
ё к т б
пасс ухо
менеджер
фауна раки
тоска г
шкант м е
атаман
в т т
н ухаб
игроки
к грач