I guess this comes from the fact that do is also used for flow control, which means it doesn't fall under the "Looks like a function" rule. print "Hello" if(0) || 1; prints "Hello", because if is not a function.
This behaviour is actually documented for last and its kind:
It is also exempt from the looks-like-a-function rule, so last ("foo")."bar" will cause "bar" to be part of the argument to last.Maybe the documentation for do should mention the same thing.
In reply to Re: parser bug handling 'do ($foo)->{bar}' ?
by Eily
in thread parser bug handling 'do ($foo)->{bar}' ?
by LanX
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |