Computer Tips [https://com.puter.tips/]
Learn. Create. Share.
Sunday, January 08, 2017
Find difference between two text files in Perl
#!/usr/bin/env perl
use strict;
use warnings;
use Text::Diff;
my $file1 = $ARGV[0];
my $file2 = $ARGV[1];
my $diffs = diff $file1,$file2;
my @strings = split("\n",$diffs);
foreach(@strings)
{
print $_."\n";
}
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.