in reply to MySQL and Perl - Shorthand

AFAIK, there's no really shorter way to do this directly with the DBI.
but using "do" directly on a dbh wont help you. the docs state that it wont return a sth.
try "selectrow_array" and its cousins instead.
("Database Handle Methods" in the dbi-docs)

i basically put the stuff you wrote into a sub in case i simply have to look up a single value.