Algorithm-Diff

 view release on metacpan or  search on metacpan

htmldiff.pl  view on Meta::CPAN

use Algorithm::Diff 'traverse_sequences';
use Text::Tabs;

my ( @a, @b );

# Take care of whitespace.
sub preprocess
{
	my $arrayRef = shift;
	chomp(@$arrayRef);
	@$arrayRef = expand(@$arrayRef);
}

# This will be called with both lines are the same
sub match
{
	my ( $ia, $ib ) = @_;
	print pre( $a[$ia] ), "\n";
}

# This will be called when there is a line in A that isn't in B



( run in 2.677 seconds using v1.01-cache-2.11-cpan-5b529ec07f3 )