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