#foreach my $word (split /\s+/, $line) { # length($word) > 2 and $count_of{$word}++; #} $count_of{$_}++ for $line =~ /\S{3,}/g;