in reply to Comparing strings from different files
that is ugly but working
output will be yours repeating lines,
accordingly == 1 will show you unique lines
P.S. and turn out warnings)
P.P.S. sorry for ugliness
run it like ./script.pl FILE1 FILE2while( <> ){ while(/(E99|99)(\w+)(?=\|)|\n/){ $key .= $`; $hash{$key}++; $key = '->'.$2; $_ = $'; } } foreach (sort keys %hash){ print "$_ $hash{$_}\n" if $hash{$_} >= 2; }
output will be yours repeating lines,
accordingly == 1 will show you unique lines
P.S. and turn out warnings)
P.P.S. sorry for ugliness
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Comparing strings from different files
by Lennotoecom (Pilgrim) on Oct 08, 2013 at 20:30 UTC |
In Section
Seekers of Perl Wisdom