in reply to Concatenate array element and scalar
If that's not what you want you will need to explain what you want more clearly.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;
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";
|
|---|