#!/usr/bin/pugs
use v6;
for (0 .. 8) -> $tmp
{
say "tmp is $tmp \n";
}
for (0 .. 8) -> $tmp
{
say " tmp is $tmp Spcl is $_ \n";
}
Output is
tmp is 0
tmp is 1
tmp is 2
tmp is 3
tmp is 4
tmp is 5
tmp is 6
tmp is 7
tmp is 8
tmp is 0 Spcl is 1
tmp is 2 Spcl is 3
tmp is 4 Spcl is 5
tmp is 6 Spcl is 7
tmp is 8 Spcl is
~Kiran
Nope. It seems that pugs is considering $tmp and the implicit usage of
$_ to specify two different parameters to the block. In fact, there's
only one: $tmp, and it is aliased to $_.
Luke
> Nope. It seems that pugs is considering $tmp and the implicit usage of
> $_ to specify two different parameters to the block. In fact, there's
> only one: $tmp, and it is aliased to $_.
Ah, and this was my problem too. Thanks, Luke or whoever fixed this one.
--
Aaron Sherman <a...@ajs.com>
Senior Systems Engineer and Toolsmith
"It's the sound of a satellite saying, 'get me down!'" -Shriekback
for (0 .. 8) -> $tmp
{
say " tmp is $tmp Spcl is $_ \n";
}
Interesting. Now, it's dependent on the use of $_. Take out that $_ and
it works fine... cool bug ;-)