in reply to Split file using perl and regexp

Use Text::CSV or Text::xSV

Examples at