Loops/Continue: Difference between revisions
Content added Content deleted
Underscore (talk | contribs) (Added Perl 6.) |
|||
Line 378: | Line 378: | ||
if ($_ % 5 == 0) { |
if ($_ % 5 == 0) { |
||
print "\n"; |
print "\n"; |
||
next; |
|||
} |
|||
print ', '; |
|||
}</lang> |
|||
=={{header|Perl 6}}== |
|||
{{trans|Perl}} |
|||
{{works with|Rakudo|#21 "Seattle"}} |
|||
<lang perl6>for 1 .. 10 { |
|||
.print; |
|||
unless $_ % 5 { |
|||
say ''; |
|||
next; |
next; |
||
} |
} |