A book I found very helpful with this type of stuff was
Sams Teach youself perl in 24 hours. I got it last year when I was getting my school's website off the ground and was a perl virgin. It has a very good (I think) explaination of how to do exactly that sort of thing.
You can do it all in one script by using hidden html fields to store information from the previous page, or cookies.
Ignorance with Confidence