open my $f => shift or die "open: $!"; open my $s => shift or die "open: $!"; while (<$f>) { if (eof $s || <$s> ne $_) {print "They differ\n"; exit} } unless (eof $s) {print "They differ\n"; exit}
But since you don't specify what you mean by "comparing 2 files", I must likely just wasted my time answering.
Abigail
In reply to Re: Line by line file compare w/ low system memory
by Abigail-II
in thread Line by line file compare w/ low system memory
by zoot
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |