develooper Front page | perl.perl6.language | Postings from January 2002

RE: Night of the Living Lexical (sequel to Apoc4: The loopkeywor d)

Thread Previous | Thread Next
From:
Melvin Smith
Date:
January 21, 2002 12:15
Subject:
RE: Night of the Living Lexical (sequel to Apoc4: The loopkeywor d)
Message ID:
5.1.0.14.0.20020121151123.00afe7f8@pop.mindspring.com
At 03:02 PM 1/21/2002 -0500, you wrote:
>Why all the fuss?  Often, you would *want* to access that lexical after the
>loop terminates, for instance to check how it terminated.

Why would you want to check it when the condition is typically boolean?

         while( my $line = <FILE> ) {

I think many people just "expect" it to work the other way. If I recall, C++
originally worked this way (at least some compilers) and went the
other way.

-Melvin


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About