The easiest way to obtain your codice fiscale, is to request one at an Italian embassy. If you have already arrived in Italy and have been informed that you need one, this is how to go about getting one.
First, find your local Agenzia Entrata. If you are in Perugia, take the MiniMetro to Fontivegge. From this stop it’s only a short walk to Via Canali 12.
Second, bring documentation! You will need to fill out a short application with your name, permanent address, and current address. You must also present your passport.
Finally, wait. I waited 20 minutes to get an appointment. Once I was in the interview, it took about 10 minutes.
Getting your codice fiscale is one of the easiest documents to process. Good luck!