On Mon, Sep 25, 2000 at 09:55:38AM +0100, Richard Proctor wrote:
> While this may be a fun thing to do - why?  what is the application?

I think I said in the RFC, didn't I? It's extending the counting use of tr///
to allow you to count several different letters at once. For instance, letter
frequencies in text is an important metric for linguists, codebreakers and
others; think about how you'd get letter frequency from a string:

    $as = $string =~ tr/a//;
    $bs = $string =~ tr/b//;
    $cs = $string =~ tr/c//;
    ...
    $zs = $string =~ tr/z//;

Ugh.

    (%alphabet) = $string =~ tr/a-z//;

Yum.

And it's on the Perl 5 wishlist, so it ain't just me that thinks its a worthy
idea.

-- 
Putting heated bricks close to the news.admin.net-abuse.* groups.
        -- Megahal (trained on asr), 1998-11-06

Reply via email to