# you lose the order and every id must be unique my %h; @h{@ID} = @name ; print join ' ', %h;