Are you sure you want an array for the result? Your description and example look more like a string: $concat = join ',', map {"!$_"} @array1;
If you really mean the array,
That's the first time I've found chop useful ;-)@array2 = map {"!$_,"} @array1; chop $array2[-1];
After Compline,
Zaxo
In reply to Re: concatenating the array elements
by Zaxo
in thread concatenating the array elements
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |