while (my @row=fetchrow_array()) { print join ",", @row; print "\n"; } #### $ mysql -t -u user -p -e "SELECT blah,Blablah from my_table"