I don't think Perl can help you much here, but I do have a tip to offer. Load up the text in notepad or something similar, start a search for a space, and cancel the search (i.e. make the dialog disappear). Keep pressing F3 (Find Next). When the found space seperates two fields, press Enter. You'll end up with newline-seperated fields, with a leading '-' marking a new record. Then, Perl might be able to help you a bit.