in reply to Not CGI related but possibly a tricky one...

CPAN yields a Net::Country module, but you don't want this ... use Abigail-II's much more useful Geography::Countries, as merlyn prescribes:
use strict; use Geography::Countries qw(country code2); use CGI qw(popup_menu); my %labels; $labels{$_} = country($_) for code2(); print popup_menu( -name => 'countries', -values => [sort keys %labels], -labels => \%labels, );
BUU's suggestion is practicle, but there is the ever so slight risk that the list you are copying from is wrong.

I recommend running this script on the command line and redirecting the output to a file, instead of using it as a CGI script (unless you have some caching mechanism employed ;)).

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)