in reply to What is the difference between a Statement and an Expression?

Perl's flexibility doesn't make this as easy to answer as it might in some languages. $x = 1+1; can be considered a statement. But it can also be considered an expression. After all, you could have a sub that ends with this statement. That sub's return value will be the value of the statement, 2. English semantics could lead you to the conclusion that a statement might have expressions as parts of it, but not the other way around. Perl is not so restrictive. My counsel: don't get too wrapped up in discerning the difference. It mostly won't matter. yours, Michael
  • Comment on Re: What is the difference between a Statement and an Expression?

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.