- or download this
#!/usr/bin/perl
use 5.010_000;
...
Hey, diddle, diddle,
The cat and the fiddle,
The cow jumped over the moon.
- or download this
Number of chars: 75
Number of words: 14
Number of lines: 3
heydiddlediddlethecatandthefiddlethecowjumpedoverthemoon
- or download this
push @words, map { lc } # change to lower case
map { tr/'//d; $_ } # remove apostrophes
split /[\s.,?!"]+/, # split on space and punctuation
$line;
- or download this
use List::Util;