Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^6: Closure warning with Perl 5.14?

by ikegami (Patriarch)
on May 19, 2011 at 09:55 UTC ( [id://905649]=note: print w/replies, xml ) Need Help??


in reply to Re^5: Closure warning with Perl 5.14?
in thread Closure warning with Perl 5.14?

To allow stuff like the following?

print(my $x = 1234) if COND;

Which is to say, they probably didn't want to step on anything that has remote chance of being legit.

Replies are listed 'Best First'.
Re^7: Closure warning with Perl 5.14?
by JavaFan (Canon) on May 19, 2011 at 10:56 UTC
    But my $x if COND; doesn't warn either, unless COND is false. Not sure what print(my $x = 1234) if 0; would be good for. Note also that print(my $x = 1234) if COND; does not have a my $x = EXPR if COND subexpression, not even on a textual level.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (4)
As of 2025-03-26 15:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    When you first encountered Perl, which feature amazed you the most?










    Results (68 votes). Check out past polls.

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.