Am 12.01.2015 um 10:46 schrieb Moritz Lenz:
> On 01/12/2015 10:36 AM, Gabor Szabo wrote:
>> On Mon, Jan 12, 2015 at 10:35 AM, Tobias Leich <em...@froggs.de
>> <mailto:em...@froggs.de>> wrote:
>> Also interesting might be the fact that BEGIN statements/blocks do
>> return a value:
>> say now() - BEGIN now; # parens needed to there so that it does
>> not gobble args
>> Hmm, actually it does not let me put the parens there:
>> $ perl6 -e 'say now() - BEGIN now;'
>> ===SORRY!=== Error while compiling -e
>> Undeclared routine:
>> now used at line 1
>> This works:
>> $ perl6 -e 'say now - BEGIN now;'
>> but I am not sure why is that interesting. Could you elaborate please?
> It's mostly interesting when you're working on the compiler, because
> it gives an easy way to time how long it takes to compile the program.
That's not quite true:
$ perl6 -e 'sleep 3; say now - BEGIN now;'