in reply to Help on format or better way to do..?
You could use join:
print join ", ", @nickArray;
That prints all the elements of @nickArray separated by a comma and a space. Or, you could set $, (output field seperator) to ", ":
$, = ", "; print @nickArray;
If you use that, you're better off localising the effect of $,:
{ local $, = ", "; print @nickArray; }
See perlvar for more on $,.
|
|---|