Em Ter, 2009-09-15 às 19:33 -0400, Aaron Sherman escreveu:
> I tried this out, and I'm not 100% certain why I got what I did (#20
> release):
> Code:
> my $x = \(-> { say "Perl 6" }); say $x();
> Output:
> Perl 6
> 1
> First off, why can I invoke a capture when it contains a lambda? Shouldn't I
On Tue, Sep 15, 2009 at 8:18 PM, yary wrote:
> Pretty sure you get the 1 as the return value of "say" (same as in
> perl5, print & say return 1 if they were able to output the entire
> string, or 0 if there was an error eg. printing to a closed
> filehandle).
Yeah, I should have been clearer. I
Pretty sure you get the 1 as the return value of "say" (same as in
perl5, print & say return 1 if they were able to output the entire
string, or 0 if there was an error eg. printing to a closed
filehandle). And the return value of any block is the last value of
the block. And you're calling the blo