I for the test did that code,
works for me:
fileA: A AA ABC ADF BFD EFF ZFF ZZD fileB: exchangeA_groupA.gateway_risk=A 10 10 AA 10 10 ABC 10 10 ADF 10 10 EFF + 10 10 MMM 10 10 NDB 10 10 RFD 10 10 ZFF 10 10 exchangeA_groupB.gateway_risk=A 10 10 AA 10 10 ABC 10 10 EFF 10 10 MMM + 10 10 NDB 10 10 RFD 10 10 ZFF 10 10 exchangeA_groupC.gateway_risk=A 10 10 AA 10 10 ABC 10 10 EFF 10 10 MMM + 10 10 NDB 10 10 RFD 10 10 ZFF 10 10 exchangeB_groupA.gateway_risk=A 10 10 AA 10 10 ABC 10 10 EFF 10 10 MMM + 10 10 NDB 10 10 RFD 10 10 ZFF 10 10 exchangeB_groupB.gateway_risk=A 10 10 AA 10 10 ABC 10 10 EFF 10 10 MMM + 10 10 NDB 10 10 RFD 10 10 ZFF 10 10 exchangeB_groupC.gateway_risk=A 10 10 AA 10 10 ABC 10 10 EFF 10 10 MMM + 10 10 NDB 10 10 RFD 10 10 ZFF 10 10 exchangeC_groupA.gateway_risk=A 10 10 AA 10 10 ABC 10 10 EFF 10 10 MMM + 10 10 NDB 10 10 RFD 10 10 ZFF 10 10 ZZD 10 10 exchangeC_groupB.gateway_risk=A 10 10 AA 10 10 ABC 10 10 EFF 10 10 MMM + 10 10 NDB 10 10 RFD 10 10 ZFF 10 10 exchangeC_groupC.gateway_risk=A 10 10 AA 10 10 ABC 10 10 EFF 10 10 MMM + 10 10 NDB 10 10 RFD 10 10 ZFF 10 10 exchangeD_groupA.gateway_risk=A 10 10 AA 10 10 ABC 10 10 EFF 10 10 MMM + 10 10 RFD 10 10 ZFF 10 10 exchangeD_groupB.gateway_risk=A 10 10 AA 10 10 ABC 10 10 EFF 10 10 MMM + 10 10 NDB 10 10 RFD 10 10 ZFF 10 10 exchangeD_groupC.gateway_risk=A 10 10 AA 10 10 ABC 10 10 EFF 10 10 MMM + 10 10 NDB 10 10 RFD 10 10 ZFF 10 10 script: open IN, "<fileA" or die $!; %fileA = map {/$/; $` => 1} <IN>; close IN; open IN, "<fileB" or die $!; while($line = <IN>){ if($line=~m/(exchange[BC]_groupA)\.gateway_risk=/){ print "in line $1:\n"; $line = $'; foreach $key (keys %fileA){ print "\tnot found $key\n" if !($line=~s/$key//); } } } close IN; result: in line exchangeB_groupA: not found BFD not found ADF not found ZZD in line exchangeC_groupA: not found BFD not found ADF
now I'm gonna test your code. Will put update with the results.
UPDATE
result of your code on my machine:
Use of uninitialized value $sym8 in string eq at ./b.pl line 39, <DATA +> line 4. A exchangeB_groupA(ln4) not found A exchangeC_groupA(ln7) not found Use of uninitialized value $sym8 in string eq at ./b.pl line 39, <DATA +> line 40. ADF exchangeB_groupA(ln4) not found ADF exchangeC_groupA(ln7) not found Use of uninitialized value $sym8 in string eq at ./b.pl line 39, <DATA +> line 52. BFD exchangeB_groupA(ln4) not found BFD exchangeC_groupA(ln7) not found Use of uninitialized value $sym8 in string eq at ./b.pl line 39, <DATA +> line 88. ZZD exchangeB_groupA(ln4) not found
P.S. did you get the job?

In reply to Re: same script, different results by Lennotoecom
in thread same script, different results by jb60606

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.