Hi ArifS,

You should probably provide some context for your question by linking to the thread this question comes from (you posted a near-duplicate of your question here). I took a look at the code and various sample inputs from that thread, and it is unclear to me which duplicates your are trying to detect - when I look at the @lists variable I hardly see any duplicates, except maybe in the "groups" item of the data structure*.

The best way to get answers is to provide: 1. sample input (in this case you're working with Perl data structures, so use Data::Dumper to output them), 2. runnable code we can use to test, and 3. the expected output and the actual output including exact error messages. See also How do I post a question effectively? and "SSCCE".

* When I use this code on this sample input data, here's what @lists looks like:

( { groups => ["INSIDE_IN", "WEB-CLIENT", "WEB-SERVER", "WEB_TCP"], line => "access-list INSIDE_IN extended permit tcp object-group +WEB-CLIENT object-group WEB-SERVER object-group WEB_TCP\n", }, { groups => ["INSIDE_IN", "EMAIL-CLIENT", "EMAIL-SERVER", "SMTP_TCP" +], line => "access-list INSIDE_IN extended permit tcp object-group +EMAIL-CLIENT object-group EMAIL-SERVER object-group SMTP_TCP\n", }, { groups => ["INSIDE_IN", "WEB_TCP"], line => "access-list INSIDE_IN extended permit tcp object-group +MYSRVR_2nd object-group MYCLIENTS_1st object-group WEB_TCP\n", }, )

Hope this helps,
-- Hauke D


In reply to Re: Print Uniq by haukex
in thread Print Uniq by ArifS

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.