Yes, it is likely to be of some use. That's precisely what you need. In English it parses like thus:

Anything else?

So this seems to be exactly what you need. Except that your description suggests you don't really want to operate on lists and you don't need to assign to arrays. Thus all in all you could do something along the lines of:

my %saw; while (<$in>) { print if !$saw{$_}++; }

which can be compacted/golfed as in my other reply.

UPDATE: speaking toungue-in-cheek - but previous experience tells me won't listen anyway: evidence is that your Perl knowledge is quite limited. So far so fine, nobody can impose to you to be an expert or to become one in a minute. But it is just as evident that you're routinely using perl to get some job done. In this case it should be recommendable to get acquainted with Perl's basic syntax, semantics, idioms. That is: asking here for help is fine and all the rest, but I guarantee to you that spending some time to read some introductory book or tutorial will enable you to solve problems like this and to understand code like the above, since I assure you that there's nothing particularly advanced or complex involved.


In reply to Re^3: Deleting duplicate lines from file by blazar
in thread Deleting duplicate lines from file by Win

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.