Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: regex, find words that occur more than once.

by GrandFather (Sage)
on Sep 14, 2020 at 12:32 UTC ( #11121727=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
    
    ++$words{$_} for split /\s+/, $text;
    print "$_: $words{$_}\n" for sort keys %words;
    
  2. or download this
    and: 2
    done: 1
    ...
    him: 3
    john: 1
    lad: 1
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11121727]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2020-11-26 00:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?