in reply to how do get value of mysql column

my $x = $dbh->selectrow_array("SELECT foo FROM bar WHERE stuff = ? ", +{}, 3);
Have a look at the "Working with Files and Databases" section of the Tutorials here on pm, especially Before asking a database related question ... and DBI recipes.

Also have a read (well worth the time) through the DBI docs to see all of the functionality it offers.