Problems? Is your data what you think it is? | |
PerlMonks |
List comparison problemby perlmonkster (Initiate) |
on Aug 16, 2019 at 02:12 UTC ( [id://11104541]=perlquestion: print w/replies, xml ) | Need Help?? |
perlmonkster has asked for the wisdom of the Perl Monks concerning the following question: Hello I somehow lost a final version of a simple Perl script to compare 2 lists, and cannot seem to figure out what is causing a problem with the version I have. The simple .pl script takes ListL.txt, compares it to ListH.txt, and then "Flags" any entries from ListH.txt that are on ListL.txt (plus gives two separate Counts at the bottom of the output). Using two short sample lists, the Counts are both correct, but for some reason one of the ListL.txt items that *should* show a ListH.txt "Flag" in the output does not. I've tried switching around Count statements, etc., but am completely baffled. Any insight as to how to fix things would be greatly appreciated. Here's the short code
Here are the two short Test Lists and Test output:
As you can see, ABC123 should be also "Flagged" as "On List H", and is driving me NUTS as to why not. Thanks very much. -perlmonkster
Back to
Seekers of Perl Wisdom
|
|