Dopo
codice:
or die ("errore");
è possibile interrompere lo script con break o exit?