Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re: Syntax Errorby idsfa (Vicar) |
on Mar 19, 2006 at 06:08 UTC ( [id://537723]=note: print w/replies, xml ) | Need Help?? |
Those lines (26 & 27) should read:
Note the braces being flipped from the way you have given. If the book really has them that way, the book is wrong. You can see this for yourself by realizing that for every opening brace, bracket or parenthesis, there must be a matching closed one. If your editor is too simple to help you keep them balanced, you should count them yourself (and get a better editor ;-). The general syntax for an if loop in this case looks like:
Your example code has ifs within ifs, but still follows this pattern. The intelligent reader will judge for himself. Without examining the facts fully and fairly, there is no way of knowing whether vox populi is really vox dei, or merely vox asinorum. — Cyrus H. Gordon
In Section
Seekers of Perl Wisdom
|
|