in reply to Re: Re: Re: Re: hash creation.
in thread hash creation.

Use a hash slice: @hash{@uids} = @points;

my @uids = (0..9); my @points = qw/1 3 2 5 10 3 2 1 3 0/; my %hash; @hash{@uids} = @points; foreach (sort { $hash{$b} <=> $hash{$a} } keys %hash) { print "$_: $hash{$_}\n"; }

Tony