- or download this
while (my ($word) = (lc $word) =~ /[a-z]{2,}/g) {
- or download this
my %hash;
while (my $line = <STDIN>) {
...
}
}
print "$_\n" for sort keys %hash;
- or download this
while (my $line = <STDIN>) {
$hash{lc $_}++ for $line =~ m/\b([a-zA-Z]{2,4})\b/g;
}
#or
do { $hash{lc $_}++ for m/\b([a-zA-Z]{2,4})\b/g } for <STDIN>;
- or download this
while (my $line = <STDIN>) {
$hash{lc $_}++ for $line =~ m/([a-zA-Z]{2,})/g;
}
delete $hash{$_} for grep /(\w)\1{4}/, keys %hash;