> perl -e\ "print join', ',map {\"Chapter $_\"} splice@{[split/\D+/,'Chap 1,2,3']},1" Chapter 1, Chapter 2, Chapter 3