in reply to Vow Triptych
my@wordsInOrder; while (<>) { foreach ("$_" =~ m/\w+/g) { push @wordsInOrder, lc($_); } }
Wow! You are copying $_ to a string before binding it to a match and then iterating over a list in a loop when you could just use the list directly:
my@wordsInOrder; while (<>) { push @wordsInOrder, lc() =~ m/\w+/g; }
In Section
Cool Uses for Perl