# New Ticket Created by Larry Brasfield # Please include the string: [perl #129316] # in the subject line of all future correspondence about this issue. # <URL: https://rt.perl.org/Ticket/Display.html?id=129316 >
Using Rakudo Star: ~$ perl6 -version This is Rakudo version 2016.07.1 built on MoarVM version 2016.07 implementing Perl 6.c. With a script, try.pl, containing this text: given prompt "Enter a number: " { when * < 0 { say "Negative"; } when * > 0 { say "Positive"; } default { say "Zero"; } } , I get results precisely as expected. (It compiles, prompts, classifies its input.) But if the script is changed, only by replacing some newline~space sequences with space: given prompt "Enter a number: " { when * < 0 { say "Negative"; } when * > 0 { say "Positive"; } default { say "Zero"; } } then an error message issues: ~$ perl6 try.pl ===SORRY!=== Error while compiling /home/larry/try.pl Strange text after block (missing semicolon or comma?) at /home/larry/try.pl:8 ------> when * < 0 { say "Negative"; }⏏ when * > 0 { say "Positive"; } default , which I expect to give the same result as before since Perl6 is not a line-oriented language (excepting a certain literal construct.) For convenience, I attach the file I used to demonstrate this bug. I discovered it when trying an example which I converted to a one-liner in an interactive REPL session. Best regards, -- Larry
#given prompt "Enter a number: " { # when * < 0 { say "Negative"; } # when * > 0 { say "Positive"; } # default { say "Zero"; } #} given prompt "Enter a number: " { when * < 0 { say "Negative"; } when * > 0 { say "Positive"; } default { say "Zero"; } }