On Mon, Sep 25, 2000 at 06:07:01AM -0700, Randal L. Schwartz wrote:
> Bart> character it finds. Plus, in Perl 5, NO core function returns a hash.
> Bart> None at all.
> 
> It's not returning a hash. 

Precisely. There ain't no such thing as "hash context". It simply returns a
list with an even number of elements. Now, when you put that into a hash, the
Right Thing happens.

And it isn't *that* slow; it uses a table, just like the ordinary way tr/a/b/
operates. That doesn't use a hash! Besides, you pay for what you get: if you
want to use this, it'll do all the work for you at *perhaps* a slight speed
expense. But it's sure faster than doing n different counts and assigns...

-- 
"Contrariwise," continued Tweedledee, "if it was so, it might be, and
if it were so, it would be; but as it isn't, it ain't.  That's logic!"
                -- Lewis Carroll, "Through the Looking Glass"

Reply via email to