... finding reverse of the same problem ... find partially mismatched lines.

There is again a lack of clarity. I would define the "reverse of the same problem" as "find all lines in file1 that do not match any string in file2 as a substring." But "find partially mismatched lines" can be taken IMHO to mean "find all lines in file1 in which some part does not match any string in file2." All lines in file1 have some part that does not match anything in file2, but I doubt this is what you really mean.

If I take the former of the two interpretations above as your intended requirement ("find all lines in file1 that do not match any string in file2 as a substring"), then the code provided by BillKSmith here can easily be adapted by changing the statement
    print grep { $_ =~ $match } @a1;
to
    print grep { $_ !~ $match } @a1;
(!~ vice =~). This change produces the output you seem to be specifying here.

Again, please see How do I post a question effectively?, How (Not) To Ask A Question and I know what I mean. Why don't you? for help with asking questions more clearly: Please help us to help you. (And please do try to take a look at Short, Self-Contained, Correct Example and How to ask better questions using Test::More and sample data.)


Give a man a fish:  <%-{-{-{-<


In reply to Re^3: partial matching of lines in perl by AnomalousMonk
in thread partial matching of lines in perl by Sidd@786

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.