On Mon, 25 Sep 2000 13:00:58 +0200, Henrik Tougaard wrote:

>Are the counts stuffed in the array in the order they appear in the
>tr-string? or in ascii-order? or whatever?

In the same order as they are in the tr/// string, of course.

        @freq{'a' .. 'z', '0' .. '9'} = tr/a-z0-9//;


That just won't work. The original proposal will however (or at least I
can't find any obvious blunders)!

The hidden flaw is that it will be FAR slower than the original tr///,
because it needs to search for the hash key for every single matching
character it finds. Plus, in Perl 5, NO core function returns a hash.
None at all.

-- 
        Bart.

Reply via email to