while ((@cols)=$sth->fetchrow_array||die("unable to print row $DBI::errstr\n")){ print OFILE join "$delimiter" => (@cols),"\n"; } #end while