#!/usr/bin/perl -w use strict; use Text::ParagraphDiff; my $old = 'this is the oooooooold textt'; my $new = 'this is the new text'; print text_diff(["$old"], ["$new"]);