in reply to Pulling data out of { }

If your data is that regular, you shouldn't have any problems, given the excellent replies already.

If your data is not as regular as you indicate, I'd go with something like ikegami's Parse::RecDescent solution, as it's more robust, and easier to modify (though if you don't understand how P::R works, you shouldn't blindly adopt it).

What I didn't see (and I'm surprised you weren't chastised for it :), is code that you've already tried. While the replies you've received are top quality, you've been deprived of the experience of learning how to get there yourself. And I wallow in complete self-interest here, because if most of the Seekers Of Perl Wisdom didn't become Givers of Perl Wisdom, Perl Monks would soon become a desert of unanswered questions, along the lines of Earl Sinclair on Dinosaurs, when he starts a call-in TV show. Something like:

Earl: "You're on Ask A Question! What's you're question?"
Caller: "What do they call those little plastic thingies on the end of shoelaces?"
Earl: "Hey, that's a good question...Next caller!"

-QM
--
Quantum Mechanics: The dreams stuff is made of

Replies are listed 'Best First'.
Re^2: Pulling data out of { }
by davido (Cardinal) on Jan 15, 2006 at 17:29 UTC

    I agree that it would have been nice to see what code the OP had worked on prior to posting. But you do have to give Felix2000 credit for this: The question began in the CB. I realized it would be better handled as a Seekers of Perl Wisdom post, and encouraged him to do a write-up, after reading Writeup Formatting Tips. Where credit is due is in the fact that for his very first post here at the Monastery he had the patience to read and comply with Writeup Formatting Tips before hastily posting his question.

    To Felix2000, welcome to the Monastery, and thanks for being one of the few newcomers whos first post here didn't require janitorial edits. In the future, also try to boil the code you've worked on down to a minimal length snippet and post that too, so we'll know what you've tried, and so we'll know we're assisting a learning process, which is what we love doing. Come back anytime, and often. ;)


    Dave