Io non conosco perl e cigiai

se vuoi ti faccio vedere come si può fare lato client (solo per le provice... tutte le città sarebbero troppe) dopo vedi tu come implementarlo lato server... ma con perl e cgi si fanno pagine tipo asp, php, jsp?
codice:
<HTML>
<HEAD>
<script language="javascript">
function objProvincia(codice,nome){
	this.codice=codice
	this.nome=nome
}
function objRegione(nome,province){
	this.nome = nome
	this.province = province
}
var regioni = new Array()

province = new Array()
province[province.length]=new objProvincia('CH','CHIETI')
province[province.length]=new objProvincia('AQ','L\'AQUILA')
province[province.length]=new objProvincia('PE','PESCARA')
province[province.length]=new objProvincia('TE','TERAMO')
regioni[regioni.length]=new objRegione('ABRUZZO',province)
province = new Array()
province[province.length]=new objProvincia('MT','MATERA')
province[province.length]=new objProvincia('PZ','POTENZA')
regioni[regioni.length]=new objRegione('BASILICATA',province)
province = new Array()
province[province.length]=new objProvincia('CZ','CATANZARO')
province[province.length]=new objProvincia('CS','COSENZA')
province[province.length]=new objProvincia('KR','CROTONE')
province[province.length]=new objProvincia('RC','REGGIO DI CALABRIA')
province[province.length]=new objProvincia('VV','VIBO VALENTIA')
regioni[regioni.length]=new objRegione('CALABRIA',province)
province = new Array()
province[province.length]=new objProvincia('AV','AVELLINO')
province[province.length]=new objProvincia('BN','BENEVENTO')
province[province.length]=new objProvincia('CE','CASERTA')
province[province.length]=new objProvincia('NA','NAPOLI')
province[province.length]=new objProvincia('SA','SALERNO')
regioni[regioni.length]=new objRegione('CAMPANIA',province)
province = new Array()
province[province.length]=new objProvincia('BO','BOLOGNA')
province[province.length]=new objProvincia('FE','FERRARA')
province[province.length]=new objProvincia('FO','FORLI\'')
province[province.length]=new objProvincia('MO','MODENA')
province[province.length]=new objProvincia('PR','PARMA')
province[province.length]=new objProvincia('PC','PIACENZA')
province[province.length]=new objProvincia('RA','RAVENNA')
province[province.length]=new objProvincia('RE','REGGIO NELL\'EMILIA')
province[province.length]=new objProvincia('RS','REPUBBLICA DI SAN MARINO')
province[province.length]=new objProvincia('RN','RIMINI')
regioni[regioni.length]=new objRegione('EMILIA-ROMAGNA',province)
province = new Array()
province[province.length]=new objProvincia('GO','GORIZIA')
province[province.length]=new objProvincia('PN','PORDENONE')
province[province.length]=new objProvincia('TS','TRIESTE')
province[province.length]=new objProvincia('UD','UDINE')
regioni[regioni.length]=new objRegione('FRIULI-VENEZIA GIULIA',province)
province = new Array()
province[province.length]=new objProvincia('CV','CITTA DEL VATICANO')
province[province.length]=new objProvincia('FR','FROSINONE')
province[province.length]=new objProvincia('LT','LATINA')
province[province.length]=new objProvincia('RI','RIETI')
province[province.length]=new objProvincia('RM','ROMA')
province[province.length]=new objProvincia('VT','VITERBO')
regioni[regioni.length]=new objRegione('LAZIO',province)
province = new Array()
province[province.length]=new objProvincia('GE','GENOVA')
province[province.length]=new objProvincia('IM','IMPERIA')
province[province.length]=new objProvincia('SP','LA SPEZIA')
province[province.length]=new objProvincia('SV','SAVONA')
regioni[regioni.length]=new objRegione('LIGURIA',province)
province = new Array()
province[province.length]=new objProvincia('BG','BERGAMO')
province[province.length]=new objProvincia('BS','BRESCIA')
province[province.length]=new objProvincia('CO','COMO')
province[province.length]=new objProvincia('CR','CREMONA')
province[province.length]=new objProvincia('LC','LECCO')
province[province.length]=new objProvincia('LO','LODI')
province[province.length]=new objProvincia('MN','MANTOVA')
province[province.length]=new objProvincia('MI','MILANO')
province[province.length]=new objProvincia('PV','PAVIA')
province[province.length]=new objProvincia('SO','SONDRIO')
province[province.length]=new objProvincia('VA','VARESE')
regioni[regioni.length]=new objRegione('LOMBARDIA',province)
province = new Array()
province[province.length]=new objProvincia('AN','ANCONA')
province[province.length]=new objProvincia('AP','ASCOLI PICENO')
province[province.length]=new objProvincia('MC','MACERATA')
province[province.length]=new objProvincia('PS','PESARO E URBINO')
regioni[regioni.length]=new objRegione('MARCHE',province)
province = new Array()
province[province.length]=new objProvincia('CB','CAMPOBASSO')
province[province.length]=new objProvincia('IS','ISERNIA')
regioni[regioni.length]=new objRegione('MOLISE',province)
province = new Array()
province[province.length]=new objProvincia('AL','ALESSANDRIA')
province[province.length]=new objProvincia('AT','ASTI')
province[province.length]=new objProvincia('BI','BIELLA')
province[province.length]=new objProvincia('CN','CUNEO')
province[province.length]=new objProvincia('NO','NOVARA')
province[province.length]=new objProvincia('TO','TORINO')
province[province.length]=new objProvincia('VB','VERBANIA-CUSIO-OSSOLA')
province[province.length]=new objProvincia('VC','VERCELLI')
regioni[regioni.length]=new objRegione('PIEMONTE',province)
province = new Array()
province[province.length]=new objProvincia('BA','BARI')
province[province.length]=new objProvincia('BR','BRINDISI')
province[province.length]=new objProvincia('FG','FOGGIA')
province[province.length]=new objProvincia('LE','LECCE')
province[province.length]=new objProvincia('TA','TARANTO')
regioni[regioni.length]=new objRegione('PUGLIA',province)
province = new Array()
province[province.length]=new objProvincia('CA','CAGLIARI')
province[province.length]=new objProvincia('NU','NUORO')
province[province.length]=new objProvincia('OR','ORISTANO')
province[province.length]=new objProvincia('SS','SASSARI')
regioni[regioni.length]=new objRegione('SARDEGNA',province)
province = new Array()
province[province.length]=new objProvincia('AG','AGRIGENTO')
province[province.length]=new objProvincia('CL','CALTANISSETTA')
province[province.length]=new objProvincia('CT','CATANIA')
province[province.length]=new objProvincia('EN','ENNA')
province[province.length]=new objProvincia('ME','MESSINA')
province[province.length]=new objProvincia('PA','PALERMO')
province[province.length]=new objProvincia('RG','RAGUSA')
province[province.length]=new objProvincia('SR','SIRACUSA')
province[province.length]=new objProvincia('TP','TRAPANI')
regioni[regioni.length]=new objRegione('SICILIA',province)
province = new Array()
province[province.length]=new objProvincia('AR','AREZZO')
province[province.length]=new objProvincia('FI','FIRENZE')
province[province.length]=new objProvincia('GR','GROSSETO')
province[province.length]=new objProvincia('LI','LIVORNO')
province[province.length]=new objProvincia('LU','LUCCA')
province[province.length]=new objProvincia('MS','MASSA-CARRARA')
province[province.length]=new objProvincia('PI','PISA')
province[province.length]=new objProvincia('PT','PISTOIA')
province[province.length]=new objProvincia('PO','PRATO')
province[province.length]=new objProvincia('SI','SIENA')
regioni[regioni.length]=new objRegione('TOSCANA',province)
province = new Array()
province[province.length]=new objProvincia('BZ','BOLZANO')
province[province.length]=new objProvincia('TN','TRENTO')
regioni[regioni.length]=new objRegione('TRENTINO-ALTO ADIGE',province)
province = new Array()
province[province.length]=new objProvincia('PG','PERUGIA')
province[province.length]=new objProvincia('TR','TERNI')
regioni[regioni.length]=new objRegione('UMBRIA',province)
province = new Array()
province[province.length]=new objProvincia('AO','AOSTA')
regioni[regioni.length]=new objRegione('VALLE D\'AOSTA',province)
province = new Array()
province[province.length]=new objProvincia('BL','BELLUNO')
province[province.length]=new objProvincia('PD','PADOVA')
province[province.length]=new objProvincia('RO','ROVIGO')
province[province.length]=new objProvincia('TV','TREVISO')
province[province.length]=new objProvincia('VE','VENEZIA')
province[province.length]=new objProvincia('VR','VERONA')
province[province.length]=new objProvincia('VI','VICENZA')
regioni[regioni.length]=new objRegione('VENETO',province)

function creaRegioni(){
	oo = document.NomeForm.regione.options
	for(i=0;i<regioni.length;i++)
		oo[oo.length]=new Option(regioni[i].nome,regioni[i].nome)
}
function svuotaOption(oo){
	for(i=(oo.length-1);i>=0;i--)
		oo[i]=null
}
function filtraProvince(reg){
	oo = document.NomeForm.provincia.options
	svuotaOption(oo)
	if(reg=='')oo[oo.length]=new Option('Selezionare la Regione','')
	else{
		for(i=0;i<regioni.length;i++)
			if(regioni[i].nome==reg){
				pro = regioni[i].province
				for(j=0;j<pro.length;j++)
					oo[oo.length]=new Option(pro[j].nome,pro[j].codice)
				i=regioni.length
			}
	}
}
function vai(ff){
	pro = ff.provincia.options[ff.provincia.selectedIndex].value
	if(pro!='')
		alert(pro)
}
</script>
</HEAD>
<title>Regioni e Province</title>
<BODY onload="creaRegioni()">
<form name="NomeForm">
<select name="regione" onchange="filtraProvince(this.options[this.selectedIndex].value)">
	<option value="">Selezionare...</option>
	<option value="">---------------</option>
</select>
<select name="provincia">
	<option value="">Selezionare la Regione</option>
</select>
<input type="button" value="vai" onclick="vai(this.form)">
</form>
</BODY>
</HTML>