I created String::Diff.
String::Diff is line diff tool, very simple.
# simple diff
my $diff = String::Diff::diff('this is Perl', 'this is Ruby');
print "$diff->[0]\n";# this is [Perl]
print "$diff->[1]\n";# this is {Ruby}
my $diff = String::Diff::diff('this is Perl', 'this is Ruby',{
remove_open => '<del>',
remove_close => '</del>',
append_open => '<ins>',
append_close => '</ins>',
});
print "$diff->[0]\n";# this is <del>Perl</del>
print "$diff->[1]\n";# this is <ins>Ruby</ins>
Algorithm::Diff is used.
thank you.
XML? (Score:1)
Re: Ooops! (Score:1)
I misunderstood. Whoops. Here's how I'd use this: with Term::ANSIColor.