in reply to reading 2 lines at a time using perl
Something like this, perhaps?
#!/usr/bin/env perl use strict; use warnings; my ($first, $second); while(($first = <DATA>) && ($second = <DATA>)) { print "1: $first", "2: $second\n"; if($first eq $second) { print STDERR "Duplicate line $first"; } } __DATA__ Hello World Hallo Welt Servas Woit foo foo
|
|---|