#!/usr/bin/perl -w use strict; my @elems = ("x", "y", "z"); my @tobepopulated; push @tobepopulated, "foo" for (1..10); my $cnt=0; my @new_array = map { $_ . "-" . $elems[$cnt++ % @elems] } @tobepopulated; print join "\n", @new_array;