You can't just stick a named BLOCK there in the middle of an expression and expect it to work. If you use B::Deparse you'll see it's being parsed as trying to call the method BEGIN on the return value of a block with just time in it.
sleep(4); print(('timespan: ' . (time - do { time }->BEGIN)));
The cake is a lie.
The cake is a lie.
The cake is a lie.
In reply to Re: Can / Do BEGIN blocks return their evaluated content?
by Fletch
in thread Can / Do BEGIN blocks return their evaluated content?
by dynamo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |