I am not really sure what you are asking but I am going to guess (pretend?) that your question is: Is there a way in
DBI to fetch a single value from a database without explicitly doing prepare, bind, execute, fetch, finish as single steps? And the answer is, yes!
my $dbh = DBI->connect(...);
my($max_foo) = $dbh->selectrow_array(q{
SELECT MAX(foo) FROM bar
});