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 reply to Re: Vow Triptych
by jwkrahn
in thread Vow Triptych
by hashED
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |