in reply to Value of a query is returning without any delimiter
change your print statement to
print $OUT "@row\n";
OR set the default "output field separator" explicitly.
You may overwrite it like so
$, = ','; print $OUT @row, "\n";
In Section
Seekers of Perl Wisdom