Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

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

by parv (Vicar)
on Sep 16, 2020 at 02:54 UTC ( #11121824=note: print w/replies, xml ) Need Help??

in reply to Re^3: regex, find words that occur more than once.
in thread regex, find words that occur more than once.

*ugh* Never mind the below as I forgot completely that regex was already accounting for the repeated words.

OP wanted to know ...

words that occur more than once

So without a counter as you state ...

... For purposes of answering the question "Has this word repeated" $words{$1} = undef; works just as well and the following increment is not required.

... I fail to see how one can find if a word appears more than once. The best one could know is if a word appears at all.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2021-03-01 23:14 GMT
Find Nodes?
    Voting Booth?
    My favorite kind of desktop background is:

    Results (28 votes). Check out past polls.