in reply to Concatenate array element and scalar

user111,
Assuming your array is NOT what you are looping over, this is quite simple.
my @array = qw(a b c d e); my @new_array; for my $variable ( 1 .. 5) { push @new_array, "$_ $variable" for @array; } print "$_\n" for sort @new_array;
If that's not what you want you will need to explain what you want more clearly.

Cheers - L~R

Update: The original node was updated after I posted to include sample code, you want to change:

push(@result,$new[$k]); push(@result,$test); # to push @result , "$new[$k] $test";