Hi there, I want to include some data into my website which covers malaria and yellow feewer related to each country. On the WHO website are all the infos I need. Their webmaster told me that unfortunatelly there is no db behind that and everything gos with html files. But I am free to extract that data. Well, I did create a txt file which looks more or less like that:
ALGERIA Yellow fever: A yellow fever vaccination certificate is required from travellers over 1 year of age coming from infected areas. Malaria: Malaria risk is limited. One small focus (P. vivax) has been reported in Ihrir (Illizi Department), but this is isolated and access + is difficult. Recommended prophylaxis: none. AMERICAN SAMOA Capital: Pago Pago Altitude: 10 m Yellow fever: A yellow fever vaccination certificate is required from travellers over 1 year of age coming from infected areas.
Now I have a table in a MySQL db naming all those countries. The goal is to extract the Yellow fever and Malaria line and put it into a mysql table related to the countries. I saw that PHP has some good functions on text. somebody mentioned in a php group, that I should better look out at a perl site.Do u guys think this could be done??? Doing it by hand could take allllloooong loooooong while. I am open for any idea! Thanx a lot for any help Cheers, Andy

In reply to extracting data out of a txt file by luditus

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.