in reply to Re: newbie hash question
in thread newbie hash question

Yes, but I'm doing it 6,000 times so I thought it would be more efficient to have a hash lookup instead of looping through the file 6,000 times.

-----------------------------------

Any comments about coding style are welcome.

Replies are listed 'Best First'.
Re: Re: Re: newbie hash question
by Cody Pendant (Prior) on Jul 24, 2003 at 23:29 UTC
    Aha, that certainly comes under the heading of "am I missing something", yes. Of course it's better that way. Mind you even better (going completely the other way) would be to dump it into a simple tied-hash database of some kind. That way you'd have it on disk for later if you wanted to do other things to it. I'd just use dbm if it was me.

    ($_='kkvvttuubbooppuuiiffssqqffssmmiibbddllffss') =~y~b-v~a-z~s; print