If you want to write your database data somewhere else, take it there.
You can gather the @rows and return the data. Or you can pass a filename/filehandle into the subroutine, which is probably better.
But you must really get your questions more precise, and give error messages. Not everybody has as much time as I take.
update: see also:
DBI recipes
Speeding up the DBI
|