There are many solutions, most are pretty straight forward. I'd suggest using Class::DBI. To make it even easier, you can use Class::DBI::Loader, which figures out the columns from the database schema directly, assuming you're dealing with some of the standard databases like Mysql or postgres. Of course, if you don't want any machinary, you can always use DBI
I am against Class::DBI for learning purpose. This has nothing to do with whether I like Class::DBI or not, but for a beginner to start with Class::DBI, too many things are hidden from his eyes. It is just not the way to learn, at least not my learning style. It is better to start from where you have to write your own SQL statements.