Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w
    use strict;
    ...
    #THIS IS THE DIRECT TEXT METHOD
    #THAT LINE BREAKS GET IGNORED
    print text_diff(["$copy_old"], ["$copy_new"]);
    
  2. or download this
    #THIS IS THE FILE METHOD THAT WORKS
    #AND DOESN"T IGNORE LINE BREAKS
    
    print text_diff('/somepath/old.txt','/somepath/new.txt');
    
  3. or download this
    $copy_old =~ s/\n/\r\n/;
    
  4. or download this
    $copy_old =~ s/\r\n/\n\n\n\n/;