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