use strict; use warnings; use Text::Diff; my $diff = diff "file1.txt", "file2.txt", { STYLE => "Context" }; print "$diff\n";