Thanks for the many great replies! I ended up using a while loop and index to step through the @array, and coalescing multiple lines into one line, which was then parsed. The index had to be incremented for each "extra" line so the outer while loop didn't re-process the coalesced lines.