while ((@cols)=$sth->fetchrow_array){ print OFILE join "$delimiter" => (@cols),"\n"; } #end while