http://qs1969.pair.com?node_id=590768

while (my @row = $sth->fetchrow_array) { my $joined = join ',', @row[0..@row-1]; # do stuff }