Translate Flat File to Balanced Tag Format


Here's our updated flat file format:
NM  Geron Corporation
SY  GERN
CO  Thomas Okarma

Each line begins with a two letter code. Here's a key to the two letter codes:
  NM  company name
  SY  stock symbol
  CO  CEO of company
  AD  address
  FO  focus areas of research and development
  WB  website
  PD  product
A balanced tag format is a lot like html. In fact, if you are going to work with XML you will have to be able to use and create balanced tag systems. Here's a simple balanced tag system to deal with our flat file data: <company> <name>Geron</name> <stock>GERN</stock> <ceo>Thomas Okarma</ceo> <address>230 Constitution Drive, Menlo Park, CA, 94025</address> <focus>nuclear transfer, stem cells, oncology</focus> <website>www.geron.com</website> <product>GRN163 - telomerase inhibitor for cancer</product> </company> For the most part, this is just a DIFFERENT way of organizing the same information, but this system is compatible with XML which may allow you to use this file format in a wider number of situations.

The essential thing to remember about balanced tags is that every tag you open you need to close.

Here's a script which will translate a file saved in this balanced tag format into a displayable web page.
parseFlat.pl


ASSIGNMENT:
Add a file for Variagenics (VGNX) and update all files to balanced tag format. Add a field for collaborator that looks like this: <collaborator>Nexia Biotechnologies, Inc.</collaborator> You will need to look up a collaborator for each company.

Finally, update the script so that it will handle this new field.