http://www.perlmonks.org?node_id=1140319


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";