Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^3: why need my in a foreach loop?

by TomDLux (Vicar)
on Nov 29, 2010 at 04:27 UTC ( #874181=note: print w/ replies, xml ) Need Help??


in reply to Re^2: why need my in a foreach loop?
in thread why need my in a foreach loop?

I love that in Perl6 loops automatically create localized variables: (may look familiar to Gabor)

for @names -> $n { say $n; }

Why not backport that feature into Perl5. Maybe only if warnings and strict and features are full on.<?p>

As Occam said: Entia non sunt multiplicanda praeter necessitatem.


Comment on Re^3: why need my in a foreach loop?
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (18)
As of 2015-07-31 15:43 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 (279 votes), past polls