In the doc syntax :
The closing curly brace followed by a newline means the delimiter of the statements, so you do not need to write a semicolon after the block of the if statement.
if True { say "Hello"; } say "world";
This is good and what happens to Why is this feed version of Perl 6 statement a "dummy expression"? .
However, how does this rule work for uncuddled else ? Is this a special case?
if True { say "Hello"; } else { say "Something else"; } say "world";
Or, what about with-orwith example :
my $s = "abc"; with $s.index("a") { say "Found a at $_" } orwith $s.index("b") { say "Found b at $_" } orwith $s.index("c") { say "Found c at $_" } else { say "Didn't find a, b or c" }
perl6
brian d foy
source share