http://qs321.pair.com?node_id=30281


in reply to How do I print an array with commas separating each element?

$, = ','; print @array;

$, is the output field separator: print will insert whatever string has been assigned to $, between all of its arguments.

Note that if you use this technique, you should make your assignment to $, temporary by doing

local $, = ',';