laziness, impatience, and hubris | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
«if», «else» and «while» are keywords part of "if" statements and "while" statements. Flow control statements don't take semicolons.
The «if» and «while» keywords are also found in statement modifiers. Statements with statement modifiers do take a semicolon.[1]
eval and map are "functions" (named operators). Function calls do no take semicolons. But they may be found in statements which do use a semicolon.
This includes simple statements.[1] These are statements that consist of nothing but an expression.
The statement you gave is an example of a simple statement, and so is the «or»-using statement above. C, C++, C#, JavaScript and Java all work this way.
Updated to elaborate. In reply to Re: why does Perl eval have a strange terminator?
by ikegami
|
|