I would love it if you stopped getting your way with every homework question that you shamelessly ask here.
I've been studying perl for three months, have no experience in programming whatsoever, and even I find your questions trivial. I suggest you try to answer them for yourself first; bothering experts with your school exercises seems nothing less than a waste of human resources.