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