in reply to Line breaks being ignored?

I believe (looking at the module's documentation) that it expects individual lines to be passed as elements of arrays which you provide references to in text_diff. So, I think you need this:

#!/usr/bin/perl -w use strict; use Text::ParagraphDiff; my $copy_old = qq|the first line the second line is here this really should be on separate lines, no? weird eh?|; my $copy_new = qq|the FIRST line the second line is there not here this really should be on sequential lines, no? weird huh?|; print text_diff([split /\n/,$copy_old], [split /\n/,$copy_new]);

Hope this helps

Replies are listed 'Best First'.
Re: Re: Line breaks being ignored?
by inblosam (Monk) on Dec 05, 2003 at 05:27 UTC
    Okay, I would have never thought of that! THANKS!! Works like a charm. You are super!


    Michael Jensen