- 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"]);
- 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');
- or download this
$copy_old =~ s/\n/\r\n/;
- or download this
$copy_old =~ s/\r\n/\n\n\n\n/;