On Mon, 28 Jun 2004 06:42:47 -0700, David Storrs <[EMAIL PROTECTED]> wrote:

On Sun, Jun 27, 2004 at 03:16:11PM -0600, Luke Palmer wrote:

But anyway, if you still want to be old school about it, then you'll end up not caring about the scope of your $i. Really you won't. And you'll be happy that it was kept around for you once you decide you want to know the value of $i for which the loop terminated.

Luke


Personally, I consider the new state of affairs to be a gift from
G--...er...Larry (ah, what's the difference?).  It always annoyed me
to have to declared my vars outside the control structure when I
often needed them afterwards.

Thank you, Larry.

strange enough, i think that current perl5 behavior is kinda good.. I often use the same $i or $j (10-years-old-Basic-habit) as counters in every loop in my program (if using $_ is not what I want), and of course it shouldn't be the SAME $i, and warnings about redeclaring variable isn't what I want to get.. if I'll need to store counter after exiting loop, I can do it in Perl6 anyway thanks to LAST {$stored=$i} (right?)...


many people - many habits...

of course, I just mutter.. new C<for> is very good, and in special cases, when simple incrementing-decrementing isn't what I want, I can write my own iterator (btw, in which apocalypse I can find how to write iterators in perl6?) with my own custom very special increment and end condition.



Reply via email to