in reply to Re^3: Lexical scope vs. postfix loops (perl bug?)
in thread Lexical scope vs. postfix loops (perl bug?)
I think that there's no one consistent way to define one. Usually variables are block scoped, so making my $x for @list behaving the same as do { my $x } for @list is just weird.Do you really think that it's weirder than having for my $x ( @list ) { BLOCK } behave the same as { my $x; for $x ( @list ) { BLOCK } }?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Lexical scope vs. postfix loops (perl bug?)
by moritz (Cardinal) on Aug 26, 2008 at 16:49 UTC |