The script has misleading names ($infile is the name of an output file), but I think the likely problem stems from a change in the format of the exclusion file:

open(ROFILE, "<", $mExcludingFile) or die("Can't open $mExcludingFile +exception file!"); while(<ROFILE>) { push(@mArray, $_); } ...

Here, $_ contains the newline from each line in the file. If the file is formatted with Windows-style newlines (\r\n), it will contain \r\n at the end of each line. These lines are collected in the @mArray array (which would likely have better been named @exclusionList or something).

... my $mLineNow = "$email $name\n"; ... foreach $mArrayNow (@mArray) { if ($mLineNow eq $mArrayNow) {

Here, the $mLineNow is built up and a Unix-style newline is added. If the exclusion file was formatted with Windows newlines, these lines will never be identical.

My approach would be to first check if the difference in whitespace is the reason:

xxd excludes/everyone.txt

Check for 0d 0a sequences. If these show up, the file has Windows-style newlines.

I would then modify the code to strip all whitespace from the lines:

open(ROFILE, "<", $mExcludingFile) or die("Can't open $mExcludingFile +exception file!"); while(<ROFILE>) { s/\s+$//; push(@mArray, $_); }
...
my $mLineNow = "$email $name"; # no newline needed here

In reply to Re: script runs, but doesn't appear to call file by Corion
in thread script runs, but doesn't appear to call file by schwende

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.