in reply to Regex capturing either quoted strings or bare words

This seems like a typical job for Parse::RecDescent. There are tutorials to be found through google.

ihb