in reply to Noob Question
If learning Perl is your goal, you're definitely on the right track, and I just wanted to congratulate you for putting in the effort in this undertaking. The book you're working your way through is a very good resource. Your syntax is valid, and others have explained the point of failure and how to overcome it. Stick with it, and welcome to the Monastery!
Dave
In Section
Seekers of Perl Wisdom