in reply to RE: Random letters
in thread Random letters

Hmm, you've just reinvented the array. :)

Seriously, there's no advantage in using a hash with ascending numeric keys corresponding to the letters of the alphabet (especially as you use zero as a base) over a simple array.

The array is faster and slightly easier to read, too, not to mention much easier to initialize: my @letters = (a .. z);

Replies are listed 'Best First'.
RE: Reinventing the array
by Anonymous Monk on Apr 12, 2000 at 22:46 UTC
    Duh...I should have realized that. It seemed fine when I ran it, but looking at the other versions, I see now my mistake! :) Still not bad for a Perl newbie. I did not partake of one of the three virtues: laziness. doh! thanks for the insight. -Maurice