--- jane doe <[EMAIL PROTECTED]> wrote:
> How do I remove duplicate items from an array?  I apologize for being
> a "newbie". :)

my @a = (1,2,2,3,4,4,5);
my %h;
@h{@a} = (); # hash keys are unique
@a = sort keys %k;

The line
 @h{@a} =();
is a bulk assignment of all elements of @a as keys in hash %h.

You can also use this trick to flip a table:

@ASCEBC{values %EBCASC} = keys %EBCASC; # flip for the compliment table

__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

Reply via email to