while ( my @row = $sth->fetchrow_array() ) { # process the row of data }