in reply to Re^2: Compare two strings of same length, character-by-character
in thread Compare two strings of same length, character-by-character
Why don't you actually outsource your callbacks - as described in the Algorithm::Diff manual? The readability of your code would be significantly improved:
traverse_sequences( \@seq1, \@seq2, { MATCH => $callback_1, DISCARD_A => $callback_2, DISCARD_B => $callback_3, }, undef, # default key-gen $myArgument1, $myArgument2, $myArgument3, ); $callback_1 = sub {…}; $callback_2 = sub {…}; $callback_3 = sub {…};
Instead of:
my $str1 = shift @_; my $str2 = shift @_;
…write: my ($str1,$str2) = @_;
The HTML thing is completely incomprehensible to me. Leave it out.
«The Crux of the Biscuit is the Apostrophe»
|
|---|