while( @info = $sth->fetchrow_array ) { $f_name = $info[0]; $l_name = $info[1]; ... # do what is necessary with these variables. }