in reply to Parsing Test File

There are several more suitable solutions for parsing the provided example
my($data) = $input =~ /\[([^\]]+)\]/s;
or if you want to be really thorough you could try the Text::Balanced module by Damian Conway. Also you probably want to use $! instead of $^E as it's more portable and pretty much the excepted standard.
HTH

broquaint