First try to get one block parsed. split, [...] for creating array references, and push will probably be useful. After that, try to parse them all. Basically your program will alternate between two states, "inside a block" and "outside a block."
Comment on Re: Looking for a good way to split a file into equal sized arrays