in reply to ignore duplicates and show unique values between 2 text files
The reason of your problem is the newline character. It is considered a part of the line you read in, but it is not present on the last line in each file. Therefore, '121' plus newline is not the same as '121' without a newline.
Use chomp to get rid of newlines:
while (my $line = <FILE>) { chomp $line; # ...
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
In Section
Seekers of Perl Wisdom