Welcome to the Monastery | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Hi tomdee27,
if you were formatting your code correctly (i.e. with consistent indentation), you would probably see your mistake. Both indentation styles shown below, used consistently, show clearly that you have a spurious extra closing curly at the end: And: Even though the compiler does not care about correct (consistent) indentation, human readers do. And that includes myself, other monks around here and, last but not least, YOU. The careless formatting of the code in your original post prevents you from seeing your error. Taking the time to carefully and consistently indent your code (using whichever indenting style you may want to choose) is never a waste of time, and it is most of the time a great time saver. Indentation may not be needed by the compiler, but it is not optional, it is essential for the human reader (you in the first place). You're obviously a beginner and may not have figured out this point until now, but, please, please, take right now the good habit for formatting correctly your code. In reply to Re: If statement issue from a Noob
by Laurent_R
|
|