nofernandes has asked for the wisdom of the Perl Monks concerning the following question:
open (F1,"f1.txt"); open (F2,"f2.txt"); while (<F1>){ $HASH{$_}++; } close(F1); while (<F2>){ $HASH{$_}++; } foreach $line (sort keys %HASH){ print "$line\n" if ($HASH{$line}>1); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Comparing 2 files!!
by Thelonius (Priest) on Jul 14, 2003 at 15:54 UTC | |
by nofernandes (Beadle) on Jul 14, 2003 at 16:12 UTC | |
by Thelonius (Priest) on Jul 14, 2003 at 16:45 UTC | |
|
Text::Diff is your friend
by barbie (Deacon) on Jul 14, 2003 at 17:04 UTC | |
|
Re: Comparing 2 files!!
by roju (Friar) on Jul 14, 2003 at 16:47 UTC | |
|
Re: Comparing 2 files!!
by hardburn (Abbot) on Jul 14, 2003 at 16:01 UTC | |
|
Re: Comparing 2 files!!
by talexb (Chancellor) on Jul 14, 2003 at 15:50 UTC | |
by PodMaster (Abbot) on Jul 14, 2003 at 15:53 UTC | |
|
Re: Comparing 2 files!!
by mr_mischief (Monsignor) on Jul 14, 2003 at 18:13 UTC |