Word frequency: Difference between revisions
m
→{{header|Perl 6}}: more concisely
Thundergnat (talk | contribs) m (→{{header|Perl 6}}: Remove some unnecessary interim variables) |
Thundergnat (talk | contribs) m (→{{header|Perl 6}}: more concisely) |
||
Line 49:
( Really, a better regex would allow for contractions and embedded apostrophes but that is beyond the scope of this task. There are words like cat-o'-nine-tails and will-o'-the-wisps in there too to make your day even more interesting. )
<lang perl6>sub MAIN ($filename, $
.say for ($filename.IO.slurp.lc ~~ m:g/
}</lang>
|