in reply to How to do simple select with Net::MySQL

While the above two answers are technically correct, they do not adress the underlying problem. Which is, you shouldn't try to interpolate your perl variable directly in to your sql string. This is bad. What you should do is use a technique called "place holders". A quick example, before you had:
$sth->prepare( qq{ select foo from bar where baz = $qux } ); $sth->execute;
You would know do:
$sth->prepare( qq{ select foo from bar where baz = ? } ); $sth->execute($qux);
This provides many benefits, some of which are saftey and speed. For far more examples and usage of place holders, see the DBI documentation and What are placeholders in DBI, and why would I want to use them?