in reply to Re: Are two lines in the text file equal
in thread Are two lines in the text file equal
Any key with a count > 1...
...might just have appeared in one file more than than once but never the other.
my $log1 = '/var/log/httpd/access_log'; my $log2 = '/var/log/httpd/access_log.1'; my %hash; open FH, $log1 or die $!; $hash{$_}++ while <FH>; close FH; open FH, $log2 or die $!; while( <FH> ) { print if $hash{$_}; } close FH;
At least, that is how I interpret the question.
Update: BrowserUk has more singular words than I have plural words to go on and so is probably right. It appears tachyon also thought two files were involved, so I won't feel too bad.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re^2: Are two lines in the text file equal (!count)
by BrowserUk (Patriarch) on Nov 13, 2003 at 03:09 UTC | |
by prostoalex (Scribe) on Nov 13, 2003 at 07:05 UTC | |
by PodMaster (Abbot) on Nov 13, 2003 at 12:29 UTC | |
by BrowserUk (Patriarch) on Nov 13, 2003 at 22:27 UTC |