in reply to Re: Insert a meter only once
in thread Insert a meter only once

Further to toolic's post: I have no idea what the word meter means in the context of the OP. The only application to written text I can think of has to do with poetry (see the linked word definitions). Is "meter" in your context something like a "metric", a "measure", perhaps a "total count"? A short, executable example might clarify this.

Update: Oops... Meant to reply to JabberJay58 in the main thread, not to toolic. Oh, well...


Give a man a fish:  <%-{-{-{-<

Replies are listed 'Best First'.
Re^3: Insert a meter only once
by Not_a_Number (Prior) on Nov 20, 2015 at 20:47 UTC

    Well 'compteur' in French means 'counter' (as in 'compteur de mots' = 'word counter').

    But 'compteur' also means 'meter', as in electricity/gas meter, or the meter in a taxi.

    So I guess the OP is really looking to count distinct words in a text.

      Perhaps JabberJay58 wants a list of the words used in a file and number of times each is used. This can be done by storing the words as the keys of a hash and keeping the counts in the corresponding values.
      Bill