5 use open IO => ':utf8';
9 $header{content_type} = 'text/html; charset=utf-8';
11 :><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
12 "http://www.w3.org/TR/html4/loose.dtd">
16 <title>country code cheat sheet</title>
17 <meta http-equiv="content-type" content="utf-8">
18 <link rel="stylesheet" type="text/css" media="all" href="/base.css">
22 <h1>Country codes</h1>
25 my $cc = do 'cc.inc.pl';
36 printf '<table class="glyphs ccmap">';
38 for my $section (qw{thead}) {
39 print "<$section><tr><th>↱";
40 print '<th>', $_ for 'a' .. 'z';
44 for my $row ('a' .. 'z') {
45 print '<tr><th>', $row;
46 for my $col ('a' .. 'z') {
47 my $code = $row . $col;
48 my $country = $cc->{$code} or do {
49 print $code =~ /^x|^q[m-z]|^aa|^zz/ ? '<td class="X Co">' : '<td>';
52 $code = $country->[2] if defined $country->[2];
53 my $img = sprintf '<img src="/flag/%s.png" alt="%s">', $code, $code
54 if -e "flag/$code.png";
55 printf "\n".'<td class="%s" title="%s">%s',
56 $img ? 'X '.$country->[1] : '', quote($country->[0]), $img;
67 <table class="glyphs"><tr>
68 <td class="X c-af">africa
69 <td class="X c-eu">europe
70 <td class="X c-as">asia
71 <td class="X c-oc">oceania
72 <td class="X c-aa">antarctica
73 <td class="X c-sa">south america
74 <td class="X c-na">north america
75 <td class="X Xi">reserved
76 <td class="X Co">user-assigned
81 <a href="/" rel="home">sheet.shiar.nl</a>/charset
82 <a href="git://git.shiar.nl/sheet" rel="vcs-git" title="Git repository"><:= $VERSION :></a>
83 created by <a href="http://shiar.nl/" rel="author">Shiar</a> •
84 <a title="Licensed under the GNU Affero General Public License, version 3" rel="copyright"
85 href="http://www.fsf.org/licensing/licenses/agpl-3.0.html">AGPLv3</a>