in reply to finding { and }

Possibly not directly applicable in this case, but check out Text::Balanced for matching balanced delimiters and Regexp::Common which will create a regexp for simpler cases.

Oh yeah, Damian++.