Hi everybody,
why is it that the following piece of code prints
three _different_ strings (in Perl 5.8)?
------8<------------------------
sub bla() {
for my $i ( reverse 0 .. 5 ) {
$i = $i + 1;
print $i;
}
print "\n";
}
bla();
bla();
bla();
------>8------------------------
It seems as if the array created to hold the
returned AV of ''reverse 0..5`` is somehow
re--used in later invocations of blah().
Bug or feature or programming error?
If it's a feature, it would be nice if
''use warn 'all';`` would warn about it :-)
Best regards,
Matthias