in reply to Value of a query is returning without any delimiter

If you just want a space as a delimiter, the easiest way is to stick the array inside the double quotes and let interpolation take care of it:

open my $OUT, '>>', "$mycrdir/file_detail.txt" or die "Can't create '$ +mycrdir/file_detail.txt'" ; while (my @row = $sth->fetchrow_array) { print $OUT "@row\n"; } close $OUT;

If you need a comma or anything more exotic, use join as described elsewhere in the thread