Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^2: How scoping works in If statements?

by kwaping (Priest)
on May 30, 2008 at 18:17 UTC ( #689298=note: print w/ replies, xml ) Need Help??


in reply to Re: How scoping works in If statements?
in thread How scoping works in If statements?

That still doesn't address the underlying scoping issue, though.

use strict; use warnings; my $x = (0) ? 5 : undef; my $x = 42; __END__ "my" variable $x masks earlier declaration in same scope

---
It's all fine and dandy until someone has to look at the code.


Comment on Re^2: How scoping works in If statements?
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (8)
As of 2015-07-02 23:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (47 votes), past polls