in reply to Comparing lines of multiple files

It is good to see use warnings; use strict. It is very disapointing to see that when the code is run a large number of warnings are produced. Clean up the warnings first then see what problems remain, or come to us first with a small fragment of code that produces a warning and ask about the warning specifically.

That aside, this is a fairly well presented node, but you should show us how the current output is in error.

For sample code like this you could create the data files at the start and remove paths from file references to make the code easier to run by testers.

my $file2 = <<DATA; 0001,Nunki 2 1,5847,71%,0.71,4151.37,ThrevenGuard,-18,-26 0003,Nunki 2 3,5000,50%,0.5,2500,Honor,-21,-13 0004,Nunki 2 4,4692,39%,0.39,1829.88,Honor,-40,-17 0005,Nunki 2 5,2615,24%,0.24,627.6,Bananiel,-44,-47 0006,Sagittarius 2 1,5000,50%,0.5,2500,Riley Prime,20,-30 0007,Sagittarius 2 2,4731,38%,0.38,1797.78,Bananiel,11,-25 0008,Sagittarius 2 3,6949,18%,0.18,1250.82,Litex,16,-44 0009,Sagittarius 2 4,3004,52%,0.52,1562.08,Bananiel,4,-21 0010,Sagittarius 2 5,3414,75%,0.75,2560.5,5r22,0,-45 0011,Sagittarius 2 6,6146,29%,0.29,1782.34,Bananiel,4,-11 0012,Sagittarius 2 7,6564,61%,0.61,4004.04,dJ,44,-32 0013,Rigel 2 1,6870,30%,0.3,2061,Black_Dragon,-44,95 0014,Rigel 2 2,5000,50%,0.5,2500,Black_Dragon,-35,102 0015,Rigel 2 3,2854,51%,0.51,1455.54,unoccupied 0016,Rigel 2 4,6247,28%,0.28,1749.16,DaSnake,-56,105 0018,Rigel 2 6,4160,59%,0.59,2454.4,Khouri,-49,75 0019,Rigel 2 7,5801,18%,0.18,1044.18,Honor,-69,103 0020,Fornacis 2 1,2409,56%,0.56,1349.04,Mariska,25,51 0021,Fornacis 2 2,5000,50%,0.5,2500,Bananiel,32,44 0022,Fornacis 2 3,6998,32%,0.32,2239.36,Riley Prime,23,35 0023,Fornacis 2 4,5483,52%,0.52,2851.16,Riley Prime,33,33 0024,Fornacis 2 5,5999,63%,0.63,3779.37,Perkins,26,67 0025,Fornacis 2 6,3038,38%,0.38,1154.44,Riley Prime,10,29 DATA my $file1 = <<DATA; 0001,Nunki 2 1,5847,71%,0.71,4151.37,ThrevenGuard,-18,-26 0002,Nunki 2 2,6366,59%,0.59,3755.94,Honor,-23,-19 0003,Nunki 2 3,5000,50%,0.5,2500,Honor,-21,-13 0004,Nunki 2 4,4692,39%,0.39,1829.88,Honor,-40,-17 0006,Sagittarius 2 1,5000,50%,0.5,2500,Riley Prime,20,-30 0007,Sagittarius 2 2,4731,38%,0.38,1797.78,Bananiel,11,-25 0008,Sagittarius 2 3,6949,18%,0.18,1250.82,Litex,16,-44 0009,Sagittarius 2 4,3004,52%,0.52,1562.08,Bananiel,4,-21 0010,Sagittarius 2 5,3414,75%,0.75,2560.5,Iridium,0,-45 0011,Sagittarius 2 6,6146,29%,0.29,1782.34,Bananiel,4,-11 0012,Sagittarius 2 7,6564,61%,0.61,4004.04,dJ,44,-32 0015,Rigel 2 3,2854,51%,0.51,1455.54,Bananiel,-30,96 0016,Rigel 2 4,6247,28%,0.28,1749.16,DaSnake,-56,105 0019,Rigel 2 7,5801,18%,0.18,1044.18,ThrevenGuard,-69,103 0020,Fornacis 2 1,2409,56%,0.56,1349.04,Mariska,25,51 0021,Fornacis 2 2,5000,50%,0.5,2500,Bananiel,32,44 0022,Fornacis 2 3,6998,32%,0.32,2239.36,Riley Prime,23,35 0023,Fornacis 2 4,5483,52%,0.52,2851.16,unoccupied 0024,Fornacis 2 5,5999,63%,0.63,3779.37,Perkins,26,67 0025,Fornacis 2 6,3038,38%,0.38,1154.44,Riley Prime,10,29 DATA #create data files open outFile, "> file1.txt"; print outFile $file1; close outFile; open outFile, "> file2.txt"; print outFile $file2; close outFile;

Perl is Huffman encoded by design.