in reply to needed help
That looks like a highly-structured input file. Do you know if it is some standard format? If so, you should first search CPAN to see if someone else has already created a parser for it.
In Section
Seekers of Perl Wisdom