Alternatively, you can use selectall_arrayref or fetchall_arrayref methods if you expect more than one row in query result. Sometimes it is better to obtain all rows of query result in one command, sometimes it is better to fetch in loop, but maximally 100 rows in one command.
Anyway, DBI documentation will show you possibilities how to write your applications.