On Wed Sep 29 21:14:01 2010, ash_gti wrote:
> The S04 section on Statement Level Bare Blocks says:
>
> # Not an error: Equivalent to "if foo() -> $x { say $x }"
> { say $^x } if foo();
>
>
> $ perl6
>
> > { say $^x } if 1;
> _block141
>
> > if 1 -> $x { say $x }
> 1
This now gives no output rather than the anonymous block's internal
name:
10:31 < [Coke]> rakudo: { say $^x } if 1;
10:31 <+p6eval> rakudo 38165a: ( no output )
This still works:
10:32 < [Coke]> rakudo: if 1 -> $x { say $x }
10:32 <+p6eval> rakudo 38165a: OUTPUT«1»
> Seems like this is not functioning correctly. for loops seem to work
fine:
>
> $ perl6
> > { say $^x } for 1..3;
> 1
> 2
> 3
> > for 1..3 { say $^x };
> 1
> 2
> 3
>
> So, this might be if statement specific.
>
>
> --
> John Harrison
--
Will "Coke" Coleda