Please have a look at How do I compose an effective node title? and at Markup in the Monastery.
Don't misuse <pre>-Tags here.
To your question: you're telling what you have as data source and what the desired result should look like.
But you don't show where you have your problems...
So, where's your problem hidden? What do you have problems with?
Are you looking for someone to write your code?
Update: You could do something like this (if you want to do it on your own):
- read data
- read data file and ignore header line
- chomp and split each line into two pieces
- create an entry in a hash-of-hash (HoH); $hash{id1}->{id2} = 1;
- store id2 in an array if not already in that array
- output:
- for each key in %hash print that key; check for every entry in your array if an entry in the HoH exists, if so, print 1, if not, print 0.
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.