sub parse_names @uncategorized = tokenize($erstwhile_name); push (@titleToks, shift @uncategorized) until ( not is_title($uncategorized[0]) or not @uncategorized ); if (not @uncategorized) { warn "all titles!"; return; } push (@nameToks, shift @uncategorized) until ( not is_name($uncategorized[0]) or not @uncategorized ); # now probably want to break up @nameToks into first and # last names; this probably involves specific lists like # "van" and "von" and "de" so you attach "de Sade", "van # Gogh" to the last name, but "Robert Louis" to the first # name if (@uncategorized) { # must be suffixes like "III", "Jr.", etc @suffixes = @uncategorized; } if (not is_acceptable_suffix(@suffixes)) { warn "problem with suffixes " . join " ", @suffixes; } }