a_file.txt sample: http://www.ok.com/test_www.pdf http://www.ok.com/test_1234.html http://www.ok.com/test_part.pdf http://www.ok.com/test_345.pdf http://www.ok.com/test_error.html #### b_file.txt sample: http://www.ok.com/test_www.pdf http://www.ok.com/test_part.pdf http://www.ok.com/test_345.pdf #### #!/usr/bin/perl use strict; use warnings; use Text::Diff; my $diffs = diff 'a_file.txt' => 'b_file.txt'; print $diffs;