Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Surpised by foreach iterator limitation

by MarkM (Curate)
on Apr 08, 2003 at 03:09 UTC ( [id://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.

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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://248788]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2024-03-28 10:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found