table units: name location ------------------ foo_unit 1 foo_unit 2 bar_unit 1 baz_unit 3 #### $iterator = Package::units->search_distinct(name); while ($iterator->next) { print }; foo bar baz