in reply to Elements in array

Here's another way:
my @array = qw(a b c d a a a a e); my %hash; @hash{@array} = 1 x @array; print join(':', keys %hash);
Update: this code has nothing to do with the question, as tadman noticed :))) Bad kappa, no cookie and of course no more beer ;)

Replies are listed 'Best First'.
Re^2: Elements in array
by tadman (Prior) on May 17, 2002 at 16:03 UTC
    To meet my sarcasm quota for the month, I am compelled to say:

    Where is the part where you count how many 'a's there are?