#select the fields from the database $dbh = gsm::connect (); $sth=$dbh->prepare ("select * from meetings order by meetings.id"); $sth->execute (); #process the columns received, one at a time while ((@report)=$sth ->fetchrow_array()) { foreach(@report) { print SAVE "$_\t"; shift (@report); } print SAVE "\n"; } #cleanup $sth->finish; $dbh->disconnect(); close SAVE;