* Paul Makepeace <[EMAIL PROTECTED]> [2002-11-27 08:53]:
> perl apparently doesn't consider $d exists by the second $d and issues
> an error. Can someone explain this? (Esp. in light of all this sequence
> point talk.)
The entire statement ist compiled at a time; at this time,
$d is undeclared. The my() declaration only takes effect for
the next statement.
> for (my $i = 0; $i < 10; $i++) works
Because it isn't really a for loop.
$ perl -MO=Deparse,-x7 -e'for(my $i = 0; $i < 10; $i++) { }'
my $i = 0;
while ($i < 10) {
();
}
continue {
++$i
}
-e syntax OK
That's why.
--
Regards,
Aristotle