Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
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 drinking their drinks and smoking their pipes about the Monastery: (8)
As of 2015-08-28 10:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The oldest computer book still on my shelves (or on my digital media) is ...













    Results (335 votes), past polls