Are you guaranteed to have trailing whitespace? What about regexp instead (`split(/, ?/)`)?