# get office_id for this office my ($ok, $office_id) = get_office_id(); if ($ok) { # found an office } else { # no office found }