in reply to Group array in threes
while (@array) { print join(',', splice @array, 0, 3) . qq/\n/ } [download]