Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Surpised by foreach iterator limitation

by MarkM (Curate)
on Apr 08, 2003 at 03:09 UTC ( #248788=note: print w/ replies, xml ) Need Help??


in reply to Surpised by foreach iterator limitation

Before around perl 5.004, even "my" was not recognized as a means to qualify the iterator variable as having a new lexical scope.

Most things Perl are defined by their actual implementation, and formed via a relaxed but somewhat controlled sort of evolution. In this case, no, I was not surprised. Most likely, because years ago, I tried it, and realized that it did not work... Thankfully, some good people have worked on making syntax such as "EXPR foreach 1 .. 10" work as I had originally expected. So there is hope yet, if you mention this 'inconsistency' to the right person.


Comment on Re: Surpised by foreach iterator limitation
Replies are listed 'Best First'.
Re: Re: Surpised by foreach iterator limitation
by shotgunefx (Parson) on Apr 08, 2003 at 03:14 UTC
    "Before around perl 5.004, even "my" was not recognized as a means..."
    <confession>Didn't know that. OTOH, I don't think I was using my or strict or warnings back then.</confession>

    -Lee

    "To be civilized is to deny one's nature."

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2015-07-28 04:31 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 (252 votes), past polls