in reply to my array is almost a hash, but keys are not unique.

Hi Boldra, the following can obviously be golfed but left this way for clarity.
use strict; my %hash; my @array=qw(one 1 two 2 two 20); for (my $i=0;$i<@array;$i+=2){ push @{$hash{$array[$i]}}, $array[$i+1]; } for my $key( keys %hash){ print "$key => @{$hash{$key}}\n"; }
UPDATE: Apologies to ELISHEVA whose answer above is almost identical with the added benefit of golfing too, I took far to long to reply and so hadn't seen that response