Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^2: difference between 'if (condition) { expression;}' and 'expression if (condition)'

by ranjan_jajodia (Monk)
on Mar 22, 2006 at 14:38 UTC ( [id://538521]=note: print w/replies, xml ) Need Help??


in reply to Re: difference between 'if (condition) { expression;}' and 'expression if (condition)'
in thread difference between 'if (condition) { expression;}' and 'expression if (condition)'

Thanks ww.
Since the second example works fine which means that even though the expression is not executed because of the condition being false, still the variable is declared. Is it like the perl interpreter first parses the code for the declared variables and their scope and then starts executing the code?
Regards,
Ranjan
  • Comment on Re^2: difference between 'if (condition) { expression;}' and 'expression if (condition)'

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (4)
As of 2024-04-20 14:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found