Thank you Monks. The first reply actually handled my problem well. But an explanation is warranted, especially since it may well give me insight on bettering my code.

I am reading in data from a sybase server. Each record has an id_num, persons, and many other fields (20). Unfortunately, the way the data is captured in the database, persons are listed in a varchar(255) field by their first name and coma seperated:

3255|bob,mary,sally,tom|2003-10-22|0|1|2003-07-01| ...

I'm need to keep each record complete by its id_num and all other fields, but I need to do various tasks based on the persons contained in each record. One of the tasks is to produce a cgi drop down list box form that would list each person. Selecting that person would then show each project they are tasked with.

I am reading in the line and creating an array of that field by splitting on the coma's. But again, each record has multiple persons (up to five).

Thanks Again,
Louis

In reply to Re: Re: Add distinct elements to an array by cosmicsoup
in thread Add distinct elements to an array by cosmicsoup

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.