Hi Monks!
I am getting data from this table, but my issue is that some duplicated information has been displayed, I can not prevent that on the sql query side of the code, I need to do it on the Perl side, here is the part of the code doing it,
$user_data = " <table cellpadding=\"0\" cellspacing=\"0\"> <thead> <tr> <td colspan=\"4\">User List</td> </tr> </thead>"; for (my $i = 0; $i < @$sql_data; $i++) { my $user = $sql_data->[$i]{user}; my $link = "<a href=\"goto.pl?user=$user\">$user</a>"; my $first = $sql_data->[$i]{first}; my $last = $sql_data->[$i]{last}; my $phone = $sql_data->[$i]{phone}; my $mail = $sql_data->[$i]{mail}; $user_data = "$user_data<tr><td><div>$show</div></td><td><div>$last, $ +first</div></td><td>$phone</td><td><div>$email</div></td></tr>"; } $user_data = "$user_data</table>";

Right there a have to test $user_data for duplicated values, and only get the unique ones.
Any help?!
Thank you!

In reply to A unique question help! by Anonymous Monk

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.