while (my @data = $sth->fetchrow_array()) { print sprintf(qq~\n%s %s %s %s %s\n~,@data); }