in reply to capturing blocks of data
You'll probably need to break out a full-fledged parser, like Parse::RecDescent. Start reading :)
---- send money to your kernel via the boot loader.. This and more wisdom available from Markov Hardburn.