Then it is time to read up on persistence, e. g. Class::DBI.
In reply to Re: MySQL - Query vs Perl by NiJo in thread MySQL - Query vs Perl by Trihedralguy