in reply to compare two text files
Hi,
use List::Compare; use strict; open (F, "a.txt")||die("a.txt File cannot open\n"); open (S, "b.txt")||die("b.txt File cannot open\n"); my @a=<F>; my @b=<S>; my $lcma = List::Compare->new(\@a, \@b); print $lcma->get_complement ,"\n"; # extra present in the second array + print $lcma->get_unique ,"\n"; # extra present in the First array
I think it helps you.
Regards,
Velusamy R.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: compare two text files
by juergenkemeter (Novice) on Jul 14, 2005 at 05:39 UTC | |
by Samy_rio (Vicar) on Jul 14, 2005 at 05:50 UTC |
In Section
Seekers of Perl Wisdom