Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Re: What is the difference between a Statement and an Expression?

by tomazos (Deacon)
on Aug 02, 2001 at 12:32 UTC ( [id://101610]=note: print w/replies, xml ) Need Help??


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

There is no technical difference between a statement and an expression. They are "human" terms.

For example, one might say that...

$x -= 1

..is a statement. "Decrease the value of x by one."

Compare with:

while ($x -= 1) { ... }

...where the same statement is being used as an expression.

You should mentally parse the words statement and expression as just "piece of code".

The EXPR context is another story however, and a has a very specific meaning to the Perl parser. That is an aside however. When people say expression they rarely mean precisely an EXPR context.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://101610]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2024-04-19 22:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found