Rosetta Code/Find bare lang tags: Difference between revisions
m
→{{header|Raku}}: perl6 -> raku
m (racket →More-extra credit: -- oops, I missed this in my manual fixup) |
Thundergnat (talk | contribs) m (→{{header|Raku}}: perl6 -> raku) |
||
Line 2,056:
{{trans|Perl}}
The only tricky thing here is the use of the <tt>ms</tt> form of match, short for <tt>m:sigspace</tt>. This causes whitespace in the regex to be considered "significant", that is, it matches optional whitespace at those positions, as if you'd put <tt>\s*</tt> there. Of course, the regexes themselves are in Raku syntax, which is quite different from Perl 5 regex syntax (and arguably much cleaner). Regex syntax is perhaps the area in which Raku diverges most from Perl 5.
<syntaxhighlight lang=
my $total = 0;
my %blanks;
|