my $var_with_chars = "a string"; my @result = []; $sql = 'call register_hit(?, @hit_count)'; #watch out for the "@"! my $sth = $db_handle->prepare($sql); $sth->execute($var_with_chars) || die $DBI::errstr; $sth->finish; # Now get the output variable @result = $db_handle->selectrow_array('SELECT @hit_count'); # || die $DBI::errstr; print "result=", $result[0], "\n";