in reply to concatenating the array elements

Hi, It's not clear what you really want. @array2 = !blue,!white,!yellow is not an array. May be you mean that you want $list = "!blue,!white,!yellow"; or @array2 = ( "!blue", "!white", "!yellow" ); The first can be done with:
$list = join ',', map { $_ = "!" . $_; } @array1;
But, probably you prefer:
foreach my $t (@array1) { push @array2, "!" . $t; ; print join ",", @array2;
Hope this help you :)