While you are getting into the swing of things, make
sure you use use strict; at the top of your program.
The program you posted will then complain horribly about
barewords (ooooh nakidity ;-) which are useful when writing
perl poetry, but not in my experience when you are writing
code you ever want to look at again!