A statement (in perl) is anything that is ended with a ";" while an expression is the part of a statement that actually does something like a mathematical computation, or the assigning of a value etc.So, in
there are three statements, my $i = 0;, $i < 10; and print "\$i = ";, but print $i isn't, and neither is the entire for construct?for (my $i = 0; $i < 10; $i++) { print "\$i = "; print $i }
Curious.
In reply to Re^2: What is the difference between a Statement and an Expression?
by JavaFan
in thread What is the difference between a Statement and an Expression?
by supernewbie
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |