I don't understand. As I read it, the split will take whitespace and a quoted string as the delimiter. So it will return all the tokens that are not quoted strings. I guess the undef return has to do with matching multiple times in the same gap? I thought split was specifically supposed to not do that.