Don't ask to ask, just ask | |
PerlMonks |
Re^2: What is the difference between a Statement and an Expression?by JavaFan (Canon) |
on Mar 02, 2012 at 01:25 UTC ( [id://957359]=note: print w/replies, xml ) | Need Help?? |
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? Curious.
In Section
Seekers of Perl Wisdom
|
|