<: use utf8; use strict; use warnings; use open IO => ':utf8'; our $VERSION = 'v1.0'; $header{content_type} = 'text/html; charset=utf-8'; :> country code cheat sheet

Country codes

<: my $cc = do 'cc.inc.pl'; sub quote { local $_ = shift; s/"/"/g; s//>/g; return $_; } { printf ''; print ''; for my $section (qw{thead}) { print "<$section>'; for my $row ('a' .. 'z') { print '
↱"; print '', $_ for 'a' .. 'z'; print "\n"; } print '
', $row; for my $col ('a' .. 'z') { my $code = $row . $col; my $country = $cc->{$code} or do { print $code =~ /^x|^q[m-z]|^aa|^zz/ ? '' : ''; next; }; $code = $country->[2] if defined $country->[2]; my $img = sprintf '%s', $code, $code if -e "flag/$code.png"; printf "\n".'%s', $img ? 'X '.$country->[1] : '', quote($country->[0]), $img; } print "\n"; } print "
\n"; } :>
africa europe asia oceania antarctica south america north america reserved user-assigned