Newsgroups: perl.perl6.language
From: la-tr...@yandex.ru (Alexey Trofimenko)
Date: Sun, 27 Jun 2004 20:57:53 +0400
Local: Sun, Jun 27 2004 12:57 pm
Subject: if, loop, and lexical scope
AFAIR, I've seen in some Apocalypse that lexical scope boundaries will be so, my question is, what the scope of variables, defined in C<if> and in perl5: my $a="first\n"; prints second if I got it right, in perl6 same program will print second or will emit warning about redeclaring variable in the same scope.. cite from Apocalypse4: so, loop (my $i=1;$i<10;$i++) { ... } will declare $i for the rest of the block, in which loop is placed, won't I feel that I will write things like: {loop (my $i=1;$i<10;$i++) { But I really hope that I missed something important, stating that theese You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||