my($good, $bad, $ugly)=part { /good/ ? 0 : /bad/ ? 1 : /ugly/ ? 2 : (warn "$_ didn't categorize" and 3) } @people;