in reply to Re^2: Comparing two text files and marking differences
in thread Comparing two text files and marking differences

I have never found the output of a standard diff to be very enlightening. I'm sure it works well to change files, patch-style, but it isn't very readable for someone simply wanting to see what happened to the text in a side-by-side format.

Plain old diff (in the GNU version) has at least four output formats:

TortoiseSVN comes with a diff and merge tool called TortoiseMerge that can show changes side by side, highlighting not only changed lines, but also changes within the lines.


Side note:

sub comparator { my $str1 = shift @_; #... my $RE = qq|</span> |; traverse_sequences( \@from, \@to, { # ... } ); return ($original, $revised); } #END SUB comparator

Proper indenting would make the "#END SUB comparator" redundant:

sub comparator { my $str1 = shift @_; #... my $RE = qq|</span> |; traverse_sequences( \@from, \@to, { # ... } ); return ($original, $revised); }

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

Replies are listed 'Best First'.
Re^4: Comparing two text files and marking differences
by Polyglot (Chaplain) on Jan 31, 2021 at 15:53 UTC

    Regarding the proper indenting making my comment "redundant":

    I use indenting as well, but I tend to have subroutines that extend well beyond one screen's worth of code. I like having that note at the bottom just to help guide me in locating my position within the file as I'm scanning. I've developed a habit for doing it this way, and it's not going to change!

    Remember, TMTOWTDI. This is my way.

    Blessings,

    ~Polyglot~