c:\@Work\Perl>perl -wMstrict -le "use Data::Dumper; my %hash; my @data = ('0', 'zero', 'foo',1, 'bar',2, 'foo',3, 'baz',4); while (my $key = shift @data) { my $value = shift @data; push @{$hash{$key}}, $value; } print Dumper \%hash " $VAR1 = {};