use strict; use warnings; my %data = ( l1 => ['x1', 'x2', 'x3'], l2 => ['y1', 'y2', 'y3', 'y4'], l3 => ['z1', 'z2', 'z3', 'z4', 'z5'], ); my @liste = (); for my $i (0 .. (keys %data) - 1) { my $key = 'l' . ($i+1); my $current = $data{$key}; print "Schleifendurchlauf '$i' ...\n"; if ($i == 0) { @liste = @$current } else { my @list_bak = @liste; @liste = (); for my $j (0 .. $#$current) { push @liste, map { "$_-$current->[$j]" } @list_bak; } } print Dumper \@liste; }