if (DB_query1() ne DB_query2()) { # Do stuff here if the strings don't match }