5 my %cc; # map of country code to info array
8 /<pre>/ .. /<\/pre>/ or next; # data is in preformatted block
10 \A (?<continent> [A-Z]{2})
11 \h (?<codea2> [A-Z]{2})
12 \h \S* \h \d* # skip other iso codes
15 $cc{ lc $+{codea2} } = [ $+{name}, "c-\L$+{continent}" ];
19 $Data::Dump::INDENT = '';
26 mkcountryinfo - Create Perl include of country info from Wikipedia page
30 curl http://en.wikipedia.org/wiki/List_of_sovereign_states_and_dependent_territories_by_continent_%28data_file%29 |
31 tools/mkcountryinfo > countries.inc.pl