hm. this is not a clean perl solution. but...
simply write out the file with person's address and continue working with your page
then have a program launched by crontab (or... task manager) every hm..15 minutes which would check the files in the specified directory, send e-mail and delete the file.